I contributed to another thread that became very heated on this subject last fall. Last fall, though, the thread was about the question of DMs disallowing men from playing female characters. I was one of the DMs who disallowed this.
This thread, however, seems to be about the question of male players playing female characters. Obviously, there's no problem with female players playing male characters.
Although I have DMed several female NPCs with moderate success, my own attempt to play a female character did not work out. Based on my own experience, though, I thought I'd offer a little advice to men considering playing female characters.
1. The Race Analogy: The idea of a human being playing an elf or dwarf being analogous to a male playing a female is absurd. That's because there is no living model of a fully 3-dimensional dwarf or elf character. Perhaps if there really were elves and dwarves in the world, people's reactions to humans playing them might be similar to the general reaction to men playing women ie. "Oh my God, this guy doesn't have a clue about real elves. The elves I know aren't anything like that. I don't think he has the slightest clue about elven motivation and thought patterns."
2. Easily Adapted Classes: If men are to consider playing women, I'd suggest looking for character types based on attributes that men and women use similarly. I would suggest that, for instance, playing a female Fighter, Paladin or Barbarian would be a lot easier for most men than playing a female Rogue, Sorceror or Bard. This is because, in many ways, playing a melee combat-focused woman doesn't really involve changing gender but rather sex. Generally, the women who are attracted to such roles are going to have more in common psychologically (and even physically) with men than women in more socially-based roles. Other character types I think men will have an easier time playing female characters in are Monks -- an ascetic role is often about complete denial/transcendence of sexuality.
3. Stay Away From Sex: If you're going to play a female character, try to stay away from romance and sex. Consciously or not, when you do this, you're using the game to work out your own psychological issues around inter-gender relations. More importantly, by engaging in quasi-masturbatory role playing, you're spoiling the game for your fellow players. Unless of course your fellow players don't mind or are right in there with you in which case I suggest that therapy may be a better use of your weekly gaming time.
4. Game With Someone Female: I recommend strongly against men playing female characters in games where there are no female players or GM. Female players are going to be the first people to notice you failing to play a truly female character and can provide you with advice and correction if your character seems to be heading off-track. Also, by having an actual model of female behaviour present the whole time you're playing, you can have constant inspiration on which to base your gaming.
5. Dice-Based Interactions: If you don't follow my advice and choose to build a socially-focused female character or you have a non-socially-focused character who finds themselves unavoidably entangled in a social situation, resort more readily to dice-rolling rather than playing-out interactions. Bluff, Diplomacy, Gather Information and other social skill rolls should be substituted for "acting like a woman" whenever possible. This isn't to suggest you should never roleplay but the processes by which women persuade men or other women of things are amongst the hardest female actions for men to comprehend and therefore play out.
6. Be Old: In my experience, it is easier to play middle aged or old women than it is to play women of reproductive age. Men and women become more chemically similar as they age and thus behaviourally converge to some degree. Furthermore, the "crone" role is one of the easiest roles to adopt because it is a fairly monolithic, simple archetype in literature and myth. The fantasy genre also has disproportionately more roles for older women versus younger women, thus making it easier to fit in to the literary genre. I'd recommend that if you choose to play a female spellcaster, you should select a character over 45.
Anyway, this post will probably be the nicest, most conciliatory thing I ever say about transgender RP.