There are three forms involved here:
1) I have to do it.
2) I've got to do it.
3) I got to do it.
As the other two members have explained, 'I have to' (1) is standard, corrrect English, while 'I got to' (3) - or worse still 'gotta' - is a casual spoken style that is not considered to be grammatically acceptable, and should never be written.
The middle form 'I've got to' (2) lies somewhere in between these two.
In everyday spoken English, especially in Britain, 'I've got to do it' is in fact the most usual and common expression. It is a colloquial, but grammatically correct and acceptable form, along with its question form 'Have you got to do it?' and 'I haven't got to do it'. It is used frequently in speech, and is also acceptable in informal written language. You wouldn't use it in business or official writing, but it is very much part of the language.