This is the standard "saran-wrap-in-place-of-condom" question. While some toothpastes may provide the correct type of thermal conductivity, "toothpaste" is too big a category to answer the question accurately. Worse, unless you want to make it a fun science project, nobody is going to be testing different types of toothpastes for thermal conductivity.
That said, the answer is probably "yes." Toothpaste is definitely better than nothing, because air (i.e., nothing) is a terrible heat conductor. That said, there are other properties to consider. From Wikipedia
- How well it fills the gaps and conforms to the component's uneven surfaces and the heat sink
- How well it adheres to those surfaces
- How well it maintains its consistency over the required temperature range
- How well it resists drying out or flaking over time
- How well it insulates electrically
- Whether it degrades with oxidation or breaks down over time
I think that toothpaste might work for the thermal part, but you might have other problems in the short- or long-run.
On A Different Note: That said, if you need to stick a note to the wall, you can definitely use chewing gum (after chewing a bit). Sometimes it's hard to get off when your lease is over, though :)