There is almost always an idea of uncertainty when we use if. With some verbs expressing in themselves lack of certainty it appears that that andif can both be used, with little practical difference in meaning between:
1. I doubt if he was there.
2. I doubt that he was there.
In #1 the uncertainty about his being there may be stronger than in #2; only the context of the utterance can make this clear. The difference is not important for practical purposes.
With absence of doubt we return to certainty, and that is now the only appropriate choice:
3. I don't doubt that he succeeded.