WASHINGTON (AP) _ Videotapes of a criminal defendant taking a bribe, selling drugs or plotting wrongdoing are powerful evidence, difficult though not always impossible to explain away, defense lawyers say.

The videotaped image of Marion Barry putting a makeshift pipe to his mouth and smoking crack cocaine is just the latest in a series of well-known undercover operations captured on tape for juries to see.

Prosecutors say such evidence is powerful because it puts defendants in a defensive posture, trying to come up with an innocent explanation for what jurors can see with their own eyes.

''Generally speaking, if you get the tapes on and unless the defendant can seriously damage the tape (with other evidence), unless the tapes are deficient, they generally work,'' said William C. Hendricks III, former head of the Justice Department's fraud section.

The videotape camera was an effective tool in the Justice Department's Abscam bribery investigation that resulted in the convictions of seven members of Congress in the early 1980s.

For example, a tape of Rep. Michael ''Ozzie'' Myers, D-Pa., taking a $50,000 payoff from an undercover FBI agent posing as an Arab shiek led to the lawmaker's conviction and expulsion from Congress.

For defense lawyers, videotaped evidence poses problems that ''generally are momentous since it is the prosecution that is staging the event in the sting operation,'' said Richard Ben-Veniste, who defended a Philadelphia lawyer convicted in Abscam.

''At best, an appearance in front of a hidden camera by an individual who later finds himself a defendant in court is ordinarily not going to be a very pleasant thing to watch,'' Ben-Veniste said.

But in a few notable cases, defense lawyers who challenged the conduct of police or federal agents who ran ''sting'' operations have won acquittals for their clients.

Automobile maker John Z. De Lorean was acquitted in 1984 of participating in a $24 million cocaine conspiracy despite a tape showing him looking into a suitcase purportedly filled with drugs and saying: ''It's better than gold. Gold weighs more than that, for God's sake.''

Defense attorneys put the conduct of government agents on trial, eliciting admissions that an FBI agent destroyed potential evidence and a Drug Enforcement Administration agent backdated documents in violation of agency policy.

The defense argued that De Lorean was pressured into participating in the drug deal, claiming there were death threats against his children if he backed out.

''What the defense can do is highlight the means under which the recorded portion of the evidence was set up,'' Ben-Veniste said.

As in the De Lorean case, Barry's lawyers are contending that the mayor was the victim of entrapment. The tape of Barry's encounter with Rasheeda Moore at the Vista Hotel provides the defense with material for arguing the mayor was coaxed into smoking crack despite his reluctance.

In the Barry case, ''there is substantial ammunition if you are dealing only with that incident'' that resulted in the mayor's arrest on Jan. 18 in a downtown hotel room where he was invited by a friend cooperating with the FBI.

The defense will try to show that ''this was really the misuse of great authority to utilize an attractive former girlfriend to get an individual using a controlled substance that he had not brought with him, that the governent supplies along with the apparatus for using it,'' Ben-Veniste said.

Washington defense lawyer Robert P. Watkins said he believes evidence of police misconduct helped win a 1976 acquittal of a former federal prosecutor who was videotaped taking money from an undercover policeman.

The evidence showed that the former prosecutor, Donald Robinson, was having an affair with a prostitute, who was caught on camera selling credit cards she had stolen from her customers to the undercover sting operation.

Robinson was lured in front of the camera and taped accepting the money in return for a file on police informants.

Despite this evidence, the tape was not enough to convict Robinson, who testified that his wife had received threatening phone calls.

Watkins, who represented Robinson, said the defense produced evidence that undercover police asked the prostitute to undress in their presence.

This evidence seriously hurt the credibility of the police, Watkins said.

''It was a factor that didn't bear directly on the issue Robinson was charged with but it certainly was, I believe, crucial, in showing that these policemen were doing extracurricular things other than just running a sting operation.''

''You have to embrace the tapes and then explain them away,'' Watkins said. ''That's what happened in this case.'' The defense was able to answer the question: ''Why was this guy put in this situation?''