you can calculate the heat of the transistor (power dissipation) with the following formula:

P = Ic x Vce

the transistor will only heat up of the speed of the fan is low. At that point, the Vce is at maximum. If the fan runs full speed, the Vce is minimum and so does the power dissipation. So, if you plan to use the circuit at full speed, you may not need to use a heatsink at all.

if you drop 4 volts from the 12 to power the fan with 8 volts, this means that Vce is 4 volts. If the fan draws 100mA at that voltage, the power dissipation on the transistor is 0.1x4= 400mW.