Sum of sines sound wave using microcontroller
To explain the problem (without solving it):


  However, for some reason, besides seeing the pure 17KHz frequency, I also hear (and see on the oscilloscope) parasitic 5KHz frequency! 


Your sampling rate is 80 kHz, so the Nyquist frequency is 40 kHz.  Your generation method produces a distorted sine wave at 17 kHz, which produces harmonics at:


17×2 = 34 kHz
17×3 = 51 kHz
17×4 = 68 kHz
17×5 = 85 kHz
...


But everything above 40 kHz gets aliased, so 


51 kHz becomes 40-(51-40) = 29 kHz
68 kHz becomes 40-(68-40) = 12 kHz
85 kHz becomes 40-(85-40) = -5 kHz, which then aliases off 0 Hz and becomes 5 kHz
...



  I've also noticed that for frequencies such as 16KHz (index increased by 80) ,8KHz there are no parasitic frequencies.


Now you've got harmonics at 32, 48, 64, 80, ...  These alias to 32 kHz, 32 kHz, 16 kHz, 0 kHz, etc.  So they aren't as obvious, but they're still there unless your wavetable is lining up perfectly with the samples.

If you look at your output using an FFT analyzer, you should be able to see these aliased harmonics more clearly:



http://www.music.mcgill.ca/~gary/307/week4/wavetables.html