Yes, people who are in the public eye need to refrain from offensive or inappropriate tweets. For Gottfried to have tweeted jokes about the devastating earthquake disaster in Japan, which resulted in so much loss of life, is offensive. He could easily have chosen from dozens of other topics to joke about instead. Because he used poor judgment and ended up offending many, it is fair that he was fired from his position.
I am normally a "free speech" advocate and believe that anyone should be able to say just about anything they want to say. Gilbert Gottfried would normally be included in my philosophy about free speech; however, I'm sure it seemed extremely insensitive to disaster victims. The fact that his commercial was for insurance, when people might need insurance in times of disaster or serious health concerns, ties in with his comments too closely to feel comfortable to anyone.
Although it's well within the company's rights to fire Gottfried because of his tasteless jokes, it wasn't really fair to the comedian. He's SUPPOSED to be telling jokes, and comedy often uses the tragic as a basis for a joke. He wouldn't really be Gottfried if he DIDN'T make some sort of offensive joke, and the company should have known that before hiring him.
The jokes might not have been the most tasteful jokes, and they might have been too soon for some people, but they were not racist or otherwise derogatory or demeaning. Dark humor is one brand of humor and by hiring a comedian to be their voice they should have understood the risk.