Yes, you can absolutely do that, and that's the arrangement almost every hybrid on the market uses. It's trivial at that point to give them a bit of assist too.
EDIT: Another neat feature of electric motors is that they produce peak torque at effectively 0RPM, where the gasoline engine produces the least. Off-the-line acceleration can be improved dramatically, even if the motor's total output is far less than the gas engine's peak output. Here's the torque curve of a 111HP gasoline engine paired with a 14HP electric motor:
At 1000rpm the electric motor is increasing total torque by almost 60%, despite being only 14HP.