D-lysergic acid diethylamide (C20H25ON3), commonly called LSD, is a powerful psychotropic drug that was used for medical, spiritual, and recreational purposes on Earth.
While visiting Earth in 1986, James T. Kirk attempted to explain Spock's erratic behavior to Gillian Taylor by saying that he believed Spock had used too much LSD (mistakenly referring to it as "LDS") during the 1960s while "he was part of the Free Speech Movement at Berkeley", California. (Star Trek IV: The Voyage Home)
LDS is an abbreviation for Latter-Day Saints, i.e. Mormons, noted for their strait-laced lifestyles. This is possibly the intended joke.