A Maryland appeals court has ruled that a jury may decide whether a psychiatrist defamed a Prince George's County policeman by writing a letter saying the officer might be "mentally deranged."

The letter was written by Dr. Barry Berkey, a Fairfax County psychiatrist, after the officer, Gregory Delia, 29, gave Berkey a speeding ticket on the Capital Beltway, according to the decision by the State Court of Special Appeals.

Delia filed suit against Berkey in Prince George's Circuit Court a year ago, claiming he had been libeled and slandered and asking for $750,000 in damages after he had been ordered to undergo a psychiatric examination by Chief Joh W. Rhoads after Rhoads received Berkey's letter.

Delia underwent a psychiatric examination on Jan. 11, 1977, and was found to have no serious abnormalities, according to police.A police investigation also cleared him of any wrongdoing.

At that point, Delia filed suit against Berkey, but Circuit Court Judge Jacob S. Levin ruled that he had failed to prove "sufficient malice" to warrant a jury trial. A three-member appeals court reversed that ruling this week and ordered Berkey to pay court costs for appeal, which had been initially funded by the Fraternal Order of Police.

The incident that eventually led to the suit occurred on Sept. 25, 1976. According to Berkey's letter, written on Sept. 30, 1976, he was on I-495 traveling with his wife and 12-year-old son when he was stopped by Delia.

Delia turned his high powered spotlights on the car while questioning Berkey and refused to turn them off when Berkey asked him to, Berkey wrote. He also refused to repeat his instructions, which were "inaudible," before Berkey signed the ticket, Berkey said.

"I regard his behavior as abnormally cruel and inhumane; crude and insensitiv e, threatening and punitive," Berkey wrote. "I neither look nor behave like a fugitive but I as well as my wife and son were treated by officer Delia as such. Partly because of my professional background and training I question whether this young officer is mentally deranged, if he is pyschopathic and or pathologically sadistic."

During the police investigation Berkey said he had based these conclusions mainly on Delia's refusal to turn off his spotlights.

"I was just following standard operating procedure when I made the stop," Delia said yesterday. "It was a routine traffic stop. When Dr. Berkey asked me to turn off the lights I told him that both for his safety and mine I couldn't do that. We were on the Beltway and we had to be very visible.

"The reason I filed the suit was not the money. His letter is still in my background jacket. Anytime I apply for a job or whatever in the future it will still be there. I wanted to clear my name and protect my future."

William A. Ehrmantraut, Berkey's lawyer, said yesterday, "If the jury were to find Dr. Berkey guilty, I think that would mean that anyone writing a letter complaining about the actions of a public official is subject to this kind of thing. That certainly isn't a good precedent to set.

"I spoke with Dr. Berkey briefly and he's very upset about this. He honestly believed he was doing something that was right. He meant no personal harm to Delia. He just thought this should be brought to the department's attention."

Delia joined the county police force in March 1976 after four years on the D.C. police force.