Toothpaste will eventually dissolve or decay, and can have a reaction with paint. It's the equivalent of using butter, instead of putty, to hold glass in a window frame!
A good filler for small gaps is PVA (white glue), which can be applied as a bead, using the tip of a cocktail stick. Any excess can be wiped off with a wet finger tip, and, when dry, the PVA will be clear (making it excellent for canopy joints), and can be painted over. If required, for deeper gaps/joints, further applications can be done, until the gap is smooth and flush.
Toothpaste as a long-term filler is probably as useful as a chocolate teapot I'm afraid!