An alleged high-level heroin dealer scheduled to go to trial today in federal court here has been accused by law enforcement officers of fabricating his defense while he sat in his jail cell.

According to affidavits in support of search warrants for the D.C. jail cell of James R. (Stampede) Johnson and the homes of several of his alleged acquaintances. Johnson wrote letters to several of his friends telling them to create alibis for him and commit perjuy during his trial.

Assistant U.S. Attorney Barry Leibowitz of the major crimes division said in court that the thrust of the allegedly fabricated defense was to attempt to make one of Johnson's seven codefendants in the drug case appear to be the drug dealer.

The codefendantnn about which the testimony reportedly was to be fabricated is Donald L. Baxter, whom Leibowitz said has not been seen recently and reportedly has been killed. Baxter's body has not been found, even though Leibowitz said a govrnment informant was told that he had been killed.

Search warrant affidavits and ivestigations said thay had located several letters in Johnson's jail cells and at his friends' home to support theircontention that he was fabricating a defense, and said he would be investigated for possible obstruction of justice and subornation of prejury charges.

They said the letters included request that witnesses meet with other persons so they could later identify them in court, and become familiar with the interior of certain houses so they could say they had been there before.

In one instance, according to the affidavits, Johnson told a female friend in a letter to use a tranquilizing medicine so she would not appear nervous when she testified to an allegedly false story.

"You must get everbody together and go over this story, so everbody will know what everbody else is saying," Johnson reportedly wrote in one letter that was seized during the searches. He said witnesses should testify that they had "played numbers with me . . . at no time have you ever seen me in the company" of other codefendants.

Letters seized in the unusual search of cell No. 41 at D.C. jail let to search warrants being issued for four residences to which letters had been addressed.

Johnson has been in jail since his arrest on Oct. 18 in conection with his alleged leadership of a sidewalk drug-sale operation in the 1800 block of 7th Street NW that police officers secretly videotaped. According to persons who have seen those tapes, the streets would appear deserted until sidewalk drug-sellers would come on the scene with their wares.

They would then stash drugs in trees and other locations and in the block, according to various court records.

While Johnson was in jail, according to affidavits filed in connection with the recent searches, he told cellbock mates about his plan to create a defense and bragged about "beating" a prior criminal charge by "lining up" witnesses in a similar manner.

One of those fellow inmates came to presecutors with the information and said he had kept a diary of his conversations with Johnson, according to the affidavits. He said Johnson had worked out detailed cover stories for his whereabouts on specific dates alleged in the indictment, and was marshaling various persons to support his claims, the affidavit continued.

"Part of the planned testimony is for people who generally work and hang in the area to testify that they know Johnson to have a small numbers operation and that he has nothing to do with dope," according to the affidavits.

Johnson had instructed the recipients of the letters about his defense to "write down their stories and memorize them for trial," according to the affidavits.

Prosecutor Leibowitz said in court there was "nothing to indicate" that Johnson's retained attorney was aware of the alleged attempt to fabricate a defense on Johnson's behalf.