Law enforcement sources said yesterday that a highly decorated D.C. police officer who was charged Thursday with distributing heroin had been under investigation for two months, and was secretly tape-recorded outside a hotel where he allegedly sold $400 worth of heroin to an undercover officer.

A police department spokesman said yesterday that Officer Adrian M. James, 27, a seven-year veteran of the force who entered the police academy immediately after high-school graduation, has been suspended with pay pending further action in the case.

According to an affidavit in support of James' arrest filed in D.C. Superior Court, James allegedly met with the undercover officer, identified only as "No. 273," outside the Skyline Inn, 10 I St. SW, on Sept. 10 at 12:55 a.m.

Court records alleged that James accepted $400 -- actually police department funds--in advance from the undercover officer in exchange for a small quantity of 18 percent pure heroin.

Law enforcement sources said that the average street sale is 3 percent pure heroin at a cost of $100 for the same quantity.

James was arrested at police headquarters where he was assigned last March to the elite, 85-member repeat offenders unit. The offense is punishable by five to 15 years in jail.

Deputy Chief Carl Profater, head of the 5th Police District, where James had been assigned until he began work at headquarters, said yesterday that James had accumulated 39 police commendations, including a silver medal awarded at the Board of Trade's annual Heroes Luncheon.

James received that medal for his role in the pursuit and gunfire exchange with Bruce Wazon Griffith, a small-time heroin dealer who had been accused of killing Officer Arthur P. Snyder in February 1980.

Griffith, who was struck by at least five police bullets, was killed in the exchange.

Profater said that James "was the type of officer who stuck very much to himself and just a few other officers.

"He seemed to enjoy police work and he seemed to be conscientious about his job. He had a knack for the job."

Officers and others at the 5th District said yesterday that James, who could not be reached for comment, "expressed an attitude that criminal activity was at the top of his list to wipe out."

"We are all disappointed. I can't believe it. It's a shock," said Ermette Williams, 21, a student at the University of Maryland who said that she is James' fiance.

Williams, who was reached at James' apartment in Alexandria, said that James had told her that "he always wanted to be a police officer."

Williams said that James, who graduated from high school in the District, lives with a roommate in a two-bedroom apartment and had been working the day shift.

"I know it's not true," Williams said of the charge against James. "You know, Adrian selling drugs? Jeopardizing the job that he loves? Come on. It doesn't make any sense," Williams said.

Also contributing to this story were Washington Post staff writers Al Kamen and Edward D. Sargent.