But your teeth can be whitened accidentally/secondarily while your primary motive is medical (to prevent decay).
Oh, for crying out loud, there's nothing sinful about wanting to look good or decent, and to not have yellow/brown teeth. Wanting to look good is typically the primary motivation for grooming. I use mouthwash and deodorant so that I don't smell bad. And there's nothing wrong with not wanting to smell bad or not wanting to look bad. Sure, certain saints did practice heroic virtue in this regard, but there's no SIN in not practicing heroic virtue (in most ordinary circuмstances).