Hello Anon
I would accept both versions:
1. I spelt "grammar" wrong. ] "Wrong" acts as an object complement, and modifies "grammar" , i.e. the word "grammar" is wrong.
2. I spelt "grammar" wrongly. ] "Wrongly" is an adverb, and modifies "spelt", i.e. the manner of spelling is wrong.
As for spelt/spelled, you can use either in British English. "Spelt" may be less common in American English, though.
Now release each other's collars very slowly and head for the bar.
MrP