As rising high school senior, I often struggle with this -- the question of whether to get rich any way I can and then make my mark on the world (a la Bill Gates), or whether I should strive for my money-making to also be genuinely (in my opinion/worldview) beneficial for mankind.
After making his fortune, Bill is now working to better the world by using it to power his charitable foundation. If you're really confident then both tasks are within your reach. Don't listen to the nay-sayers who'd rather we all work as volunteers for the Peace Corps
Don't get me wrong. I have tremendous respect for Bill -- I look up to him and give him a LOT of credit for his recent work and humility. But I don't think Bill did "both". He definitely fell squarely into the first limited category: being a ruthless capitalist to get rich, and then trying to figure out how to actually bring some tangible good into the world with that money. (See also Andrew Carnegie)