I'm not sure I agree with the logic that "the most altruistic thing you can possibly do is to earn as much money as you can so you can donate more money." That's one way to do good, sure. But generally speaking, a worker in any field is only going to capture a small percentage of the value he creates; usually about 10%.
So, logically speaking, the total number of utils created by the work you're doing should outweigh your own income. The positive or negative effect your work has on the world at a whole may be more significant then even your total income, let alone the 5%-10% of your total income you might be able to give to charity.
That's not to say that charity's not significant, but it seems that at least in many cases it would be more altruistic to do a job with direct positive results (especially if you work hard and are better then average at that job) then to get a job with less direct positive results and then give more money to charity. A really excellent teacher who does a much better then average job educating his students, earns $50,000, and gives $5000 a year to charity, may be doing more good then that same person working as a bond trader, earning $100,000 and giving $10,000 a year to charity.
Where does the 10% figure come from?
A very interesting article on "earning to give", featuring LessWrong members Jeff Kaufman, Julia Wise, Holden Karnofsky, William MacAskill and Toby Ord. Some excerpts: