The Food and Drug Administration has approved over-the-counter sales of a test for the virus that causes AIDS, the agency said Tuesday.