I would highly recommend against it, but it is possible for a chameleon to put a salamander in its mouth and swallow it. Many salamanders are poisonous, and even if they were not, there are numerous reasons not to feed them to chameleons including parasite transfer, improper nutrition, etc. Definitely stick with insects.
In addition to everything else said, chameleons are insectivores. Is a salamander an insect? Nope! Problem solved. Not safe. In general, it is unwise to feed chameleons vertebrate animals. Their bodies just aren't made to digest things with bones and that have so much meat on them