Controlling DC Motor with Raspberry Pi
Googled "raspberry pi transistor" and found many results that would suit your need.

Make sure the transistor can handle the motors current.

PWM is possible with this configuration.

http://justinzondagh.com/wp-content/uploads/2013/06/2013-06-03-Motor-Switch-NPN-Transistor2-624x365.png