pwm out of pin 5 with a 1uf to ground and 4.7k resistor to the base of a NPN 3904 transistor, driving a P channel Fet
for my 2 cents worth , the 1uf to ground probably just makes the fet switch slower and dissipate more energy . if the pwm freq is high enough and
if the light is for humans then pwm flicker is invisible even at 50 Hz [can you see your mains freq ac lighting flicker ?]