Separate volume level for speaker-phone mode?
Boy, separate volume controls for the speaker and earpiece would be useful, wouldn't they?

You can probably do what you want with Tasker. It lets you control all kinds of settings on the phone based on events. (Some ideas from Lifehacker.)