Toothpaste (and more professional polishers, like Brasso) is able to remove scratches from things like CDs and lenses because it has very small micro-abrasives that (when combined with force) smooth-out the area around the scratch.
This works well for CDs, but because lenses have such strict tolerences, making the lens even a little bit thinner by polishing it will cause the light that enters the camera through that area to hit the sensor slightly off-center. This will result in your images being slightly more blurry. A scratch, on the other hand, will scatter the light even more, but because it's scattered so much, it will probably actually be less visible in the final image because the intensity of the scattered light will be so much lower.
Thus, unless your scratch is extremely shallow, you are probably better off leaving the scratch in the lens than trying to polish it away, using any method.
(Though, note that the placement of the scratch is important - a scratch in the center of the lens may have a large effect when using small apertures, where only a small portion of the lens is actually used)