It wasn't ____ that did it.
If you rephrase the sentence, you could say "I wasn't the one who did it." You would not, however, say, "Me wasn't the one who did it."
Turn the sentence around. I wasn't or me wasn't? Which is correct? Whatever you choose is the same for the original sentence. Also, the sentence should read "who" rather than "that." Who refers to a person, that refers to a thing or animal. Current usage kind of ignores this, but the truth still stands, whether acknowledged or ignored.
The correct answer is "me" because:
I = subjective case.
me = objective case.
Using "that" to refer to people is perfectly acceptable. Replacing "that" with "who" does not always work.
"That is her mother." not "Who is her mother."
"... fool that he is." not "... fool who he is."
A trick that may help some people pick the right form to use is to rephrase the sentence using he/she or him/her. If you choose he or she, then you should use 'I'. Otherwise, use 'me'. The same trick can help when choosing between we/us and they/them.