That was just an example of something that could be in it, as was the red dye. There are a lot of triggers for migraines. Maybe buy a bunch of different types and brands of toothpaste and see if any don't cause problems, then compare the ingredients between the one that doesn't cause issues and the one that does. Maybe try brushing your teeth with a baking soda and water paste and see if that causes problems, and if it does, just straight water, etc. There could be a million reasons- Maybe it's the sensation of brushing your teeth and not the toothpaste at all. The best way to find a solution to a problem is to rule as much out as possible.
If you know for a fact with little to no doubt that you don't get a migraine on the days you've had diet soda (or a day or two after) then aspartame is probably off the table, but not all soda uses it now- Also, sometimes when we're not looking for things, we don't make a link between one thing and another- Just a thought.