Key Idea A compound could be optically active only when it contains at least one asymmetric carbon atom or a chiral center (A carbon atom which is attached by four different group is called an asymmetric carbon atom or chiral center).
Lactic acid is
It has one asymmetric carbon atom or chiral center. So, it shows optical activity.
While in benzoic acid (C6H5COOH), oxalic acid and acetic acid (CH3COOH) there is no asymmetric carbon atom hence, these are optically inactive.