Can some pills cause loss of taste?

Yes. Clarithromycin in particular causes a taste perversion (everything tastes metallic). Some can also numb the tongue locally, like lidocaine.