TRIAC not turning off correctly
Your TRIAC does turn off correctly. Remember, it's turning off automatically as soon the current through it is zero. Not as soon the voltage over it is zero.

What you have there is a slightly inductive load which introduces a phase-shift between voltage and current. It's all okay. Those spikes will become a bit smaller as soon you put more load on the 12V side of the transformer, but in general, they do no harm. They only affect your minimal control angle.