"That" is correct in every standard dialect: American, British, Canadian, etc.
"what" is occasionally used instead of "that" in a few nonstandard dialects, including Cockney British and certain dialects in the Appalachian Mountains in America.
You can google "the man what done it" or "the man wot done it" for some more examples.
However, most speakers would consider the "what" version to be very strange. As a nonnative, you should use "that".