DIY L298n motor controller - need a little help

I think you can set the TCCR2B after the pinMode() call in setup.

You can set the prescaler, but the prescaler is different than the prescaler of TIMER0 and TIMER1.
It is easier to use only the TCCR2B with the values in the table.
You can read all about the timers in the datasheet.

Could you clean up your code for the timer that is used ?
Decide if you use Timer1 or Timer2.
If you use Timer2, use output pin 11 or 3 for the PWM output and change the comment that with the text "timer0".

This is a library, http://code.google.com/p/arduino-pwm-frequency-library/