PWM Code to for mosfet gate

Yes
Timer1 with no prescale and TOP set to 511 will give you 32.25kHz