Many gay men do identify themselves as strictly a top (the giver) or a bottom (the receiver) in anal sex, but to say that a feminine guy is almost always a bottom and a masculine guy is almost always a top is just plain wrong. Maybe it seems that way because many 'masculine acting' guys would not admit in public that they enjoy being the receiver- that would take away from their macho image. Any gay person will tell you that if you want to be sure a guy is a top or a bottom you had better ask them and not wait until you get into the bedroom, because it's not uncommon to find a butch guy who only wants to bottom OR a waify queen who refuses to let anything near his butt.
As I said, most gay men who only prefer one role will actively seek out ONLY men who prefer the other- so they already know who will be doing what.
A majority of gay men are what you call 'versatile,' which means they can/will be the giver or the receiver during anal sex. Things are not so cut and dry when you factor them into the equation.
Sometimes a versatile guy will meet a man who is either a top or a bottom and will automatically fall into the appropriate role. By the time they get around to having sex, the versatile guy will pretty much know if they are going to top or bottom.
Other times two versatile guys meet and they have to decide which is going to top or bottom. Sometimes they discuss it beforehand and sometimes they just play it by ear. It's also not uncommon for two versatile guys to take turns giving and receiving.