Two initials are fine; it's not necessarily common, but it's not "weird", either.
As for spacing, this may be a matter of style. To me, no space at all can look awkward or cramped, so I would probably include a space after the D.:
Anh D. M. Pham
However (as @tchrist indicates in a comment below), some seem to find the space equally distracting. For more formal documents, perhaps the best course of action would be to use a thin space – provided your word processor or printer would support it.
As for where to put the nickname, I'm assuming "Andy" might be derived from "Anh D." If so, then:
Anh D. "Andy" Pham
might read a little more naturally than:
Anh D. M. "Andy" Pham
So, in your case, you may have a legitimate reason to omit your second middle initial when you are including your nickname.