Sine wave frequency vs. PWM frequency (AVR)
The 31.25kHz is 625x your 50Hz. So all you have to do is build a 625 entries sine lookup table, and at each interrupt set your output compare value to the next table entry. If you have a 32\$\mu\$s interrupt you'll have ran over the full table (=full sine cycle) every 625 x 32\$\mu\$s = 20ms, so that will be your 50Hz.