"Ich habe" is the accepted correct written form. It is always OK to use it.
It is never OK to use "ich hab" in professional or official written communication.
"Ich hab" is fine in informal conversations like forums, chat rooms or personal E-Mails.
However, even if the spoken form would be thick with colloquialisms, it is perfectly normal for informal written communication to obey the rules of correct German.
Real world example: When I speak with my father, we use very heavy swabian. In all written communication however, we use perfect high german.
In speaking, "Ich habe" is never wrong. However, in most everyday informal conversations in most areas of the country, the trailing
e is swallowed.
To someone learning German as a second language, I'd say if in doubt, use "ich habe". Continued exposure to everyday interactions with Germans will show you quickly when and where it is usually dropped.