A 34-year-old District pharmacist has been arrested and charged with illegialy distributing more than $500,000 worth of drugs -- primarily Dilaudid and cocaine -- in an alleged prescripion-for-pay scheme.

The pharmacist, Martin A. Bramson of 9004 Montpelier Dr., Laurel, owns the St. Jude Apothecary at 2802 Rhode Island Ave. NE. His arrest followed a 3 1/2-year investigation by D.C. police and federal drug enforcement agents.

Assistant U.S. Attorney C. Madison Brewer said yesterday that Bramson has been accused in conspiring with a Washington physician in the case. The physician is under investigation in connection with the case but has not been indicted, Brewer said.

Bramson was arrested Monday after a federal grand jury indicted him last Friday. The investigation by D.C. narcotics detectives and federal Drug Enforcement Administration agents began in January 1977.

Bramson was charged with distributing 22,000 Dilaudid pills valued at $550,000 and six ounces of cocaine, worth $18,000. Records seized during the investigation indicated that as much as $5 million worth of the drugs may have been distributed during this period, according to Brewer.

D.C. narcotics detectives said Dilaudid pills, in 2 milligram and 4 milligram doses, sell on the street fro about $20 and $40 respectively. Local pharmacists say the pills normally retail legally for $2.50 and $3.30 for six pills respecitvely.

D.C. detective Martin Pracht said that Bramson's arrest, along with the arrest of two other pharmacists and eight other doctors on similar charges in the D.C. area in recent months, "have cut substantially" into the illicit drug traffic in these legal but often abused substances.

Detective Pracht said drug users would go to the doctor and pay an undisclosed fee for an examination, following which the doctor would issue a prescription for the drugs. The patient would then go to Bramson's drugstore, where the prescription would be filled with no questions asked, Pracht said.