Do you really need to use assembler? You might be better off with nanojit.
Otherwise, you can certainly do this - but it won't be pretty. You can call the VisualStudio assembler, ml.exe, from your code. You would take the instructions, write them to a file with an appropriate header/trailer defining a unique proc name and assemble them into a dll, then call LoadLibrary() and GetProcAddress() to get the address of the code to call, which you can then call like any other function pointer. If you want to get the byte values of particular instructions, use offsets from your header/trailer to figure that out.
See here for how to configure a project with asm files in it. Everything in it you can do dynamically by calling ml yourself.