"Hafta" and "gotta" are both slang words. They're informal contractions of "have to" and "got to." You may hear them in everyday speech, but they are improper English, and should not be used in a formal or business setting or in your writing.
I don't encourage using either one, but if you do, I "hafta" (have to) is closer to being correct English. (I "got to" go is incorrect English in this context even if you don't use the slang contraction "gotta"). Also, what may sound like "hafta" is actually the person saying "have to" very quickly without strongly enunciating the "v."