It's legal, but usually frowned upon and not many do it. One good reason for this is that almost everyone who runs for high office either already holds an office (Like Kerry, Obama, and Bush) or are independently wealthy (like Jack Ryan or John Corzine).
In fact, part of the rational behind it being legal - and behind Keyes doing it - is that few "ordinary people" could afford to be away from their prime source of income for the time necessary to be elected.
Personally, I understand the negative political ramifications, but I see nothing wrong with it so long as the salary was not excessive. I suppose one could argue that $96,000 a year is excessive (depending on what your obligations were) but the fact of having a "salary" itself doesn't bother me at all.
God knows If I ever ran for anything I'D need one.