Some toothpastes can reduce the size of a pimple, as they contain ingredients such as menthol and alcohol that dry the skin and draw out impurities. However using toothpaste will not kill the bacteria causing the problem or prevent future acne. Furthermore, the very ingredients that help reduce the size of pimples, can also dry the skin and cause irritation.
If you are desperate for a quick fix, try using a good speedy spot remover, such as Origins Super Spot Remover 10ml (£15.00 House of Fraser / $15.50 origins.com).