PWM on DC motor

Get yourself a motor driver and save the headaches.

You'll need a much larger transistor for most cheapie motors.

If you are looking for offboard, something like this one:
http://www.solarbotics.com/products/k_cmd/

Otherwise,
http://www.hvwtech.com/products_view.asp?ProductID=991