Question: Do girls and boys really need different toys especially when they are very young? I am speculating part of reason why girls tend to play with Barbie dolls and boys tend to play with transformers is:

* Parents make decisions for them.

Would girls play with Lego at all?

Answer: 
Let the child decide. Offer both and see what they like.
I think if you have several kids of differing genders and sexes you will see that overall, no they don't need different toys & your sons can play with barbies just fine. 

What makes you assume a lego is a preferable toy to one that allows you to role-play, make up story lines, etc? What makes building better? ;)

Overall though, my children gravitate toward toys you would likely think of being typical of gender. They are homeschooled, have toys of all sorts to choose from and don't have network TV - sooooo, I'd say it's not an uncommon preference and likely not instilled by parents. That said, I do not think a parent should ever discourage a child from what toys they prefer.

That said, I wonder why toy makers make such gender specific toys (dolls saying only "mama") and why the stores most often make such gender specific sections. My sons loved toy kitchens and shopping carts, foods and such. In most store this was all put over with girl toys and many were only available in pink. While my boys don't mind some pink, they didn't want a ton of pink toys. My one son also loved baby dolls. He wanted one that said "dada" so badly and I never was able to find one. So many of these toys have several things they can do these days, there is no reason a doll maker cannot put a "mama" and "dada" switch onto a doll. None. 

And of course girls will play with legos, and transformers and generally they are allowed to. Your bigger cultural issue is are boys allowed to play Barbies, My Little ponies, Strawberry Shortcake, or similar "girl" things. Girls have been "allowed" to play with boy toys all my life, they just get thought of as "tom boys". Boys on the other hand are seldom allowed that same freedom to enjoy nurturing play, domestic play, cute play.