An enzyme, requiring pyridoxal phosphate as coenzyme, that catalyzes the reversible racemization of L-alanine to D-alanine; found in various microorganisms, where it plays a role in the biosynthesis of the D-amino acids present in the capsular proteins.