Heh, those darn sentences are always a problem for learners... I'd say the most common and natural ones would be:
I don't remember when I last went to the movies.
I don't remember when it was that I last went to the movies.The other ones are... problematic, in my opinion. I'd say #1 is better in common spoken English.
1) I don't remember when was the last time I went to the movies.
2) I don't remember when the last time was I went to the movies.
But this is just my opinion. I have trouble with such structures too.

EDIT: There! RayH had the solution. Get rid of "when" and say "I don't remember the last time I did something!"