"I have to do that", "I have got to do that". These communicate the idea that a person MUST do something. The thing to be done is imperative.
If the intention is to communicate the same idea with the first sentence, it is an improper grammar.
"I got to do that." would not be appropriate to that meaning. It would be appropriate to write or say, "I have got to do that." To write or say "I got to do that." means literally, not that
one MUST do something, but that one had the OPPORTUNITY to do something,
or the POSSIBILITY of doing something.
If someone took the child to the Amusement Park to ride the Roller Coaster, the child might say; "I got to do that!". It means the child had the opportunity to do the thing.
If I write or say that; "I have to do that", or "I have got to do that"; it means that I am communicating that I MUST do it. It is imperative that I do it. It is something required of me or demanded of me. I "have to" do it.
This is different from telling someone in speech or writing that I MIGHT do something.
For example, I can say; "Ruby, you HAVE TO write and speak as I tell you." or if I say
"Ruby, you HAVE GOT TO DO IT" it means that I am giving you a command.
If I say or write; "Ruby, you GOT TO BE a member on Italki" it merely refers to your opportunity and your choice to be a member on Italki?
Generally, it is best to avoid a simplistic phrasing like "got to". The much better phrasing for clarity is to communicate the thought this way:
"I have (or had) the opportunity to do something." The verb GOT, is better left for communicating to others that you are in possession of a physical thing or a physical circumstance.