Thermal calculation for a D2PAK with a SMT Heatsink
You don't use the original Tja anymore because it's not valid - there are new thermal resistances to place between the junction and the ambient air. 

Have a look at this Analog Devices application note MT-093.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

You can see that: $$\Theta_{JA} = \Theta_{JC} + \Theta_{CA}$$

Now when you add a heatsink, you are inserting another thermal resistance between the case and ambient air, so your equation becomes:

$$\Theta_{JA} = \Theta_{JC} + \Theta_{CS} + \Theta_{SA}$$

Where Tcs is thermal resistance of the case to your sink. This depends on your interface material, sometimes known as "thermal grease". Various factors (surface area, applied pressure) change how well the thermal grease will conduct heat. An estimate of .25°C/W seems reasonable. 

Tsa is the thermal resistance of the sink to ambient. (3°C/W as stated, with some airflow)

So to calculate your maximum allowable ambient temp:

$$ T_A = T_J - P * (\Theta_{JC} + \Theta_{CS} + \Theta_{SA}) $$