To my knowledge all the decent hotels are in the centre of town. However at the time that you would need to set off for the airport there won't be much traffic so it would probably only take you 30 minutes in a taxi.
The best hotel in Dar es Salaam is the Kempinski; the Holiday Inn is also OK and is a bit cheaper.