Praise be to Allaah.
Shaykh Ibn Baaz (may Allaah have mercy on him) was asked about using toothpaste whilst fasting. He said: there is nothing wrong with that so long as one is careful to avoid swallowing any of it, just as it is prescribed in Islam for the fasting person to use the siwaak (tooth-stick)
Fataawa al-Shaykh Ibn Baaz, 4/247
Shaykh Muhammad al-Saalih ibn ‘Uthaymeen said:
… This leads us to the question: Is it permissible to use a toothbrush and toothpaste whilst fasting or not?
The answer is that it is permitted, but it is preferable not to use them because the toothpaste is too strong and may go down into the throat. Instead of doing that during the day, one should do it at night.
Al-Sharh al-Mumti’ by Ibn ‘Uthaymeen, 6/407, 408.