FBI agents here have arrested a former stockbrokerage clerk for allegedly putting rat poison in cold, allergy and diet capsules, the first drug-tampering arrest in four years of national scares over contamination of retail food and drugs.

FBI special agent Richard T. Bretzing said Edward Arlen Marks, 24, a native of Framingham, Mass., living in Temple City, 10 miles east of here, apparently hoped to make money on the stock market by creating a panic that would drive down the price of shares in the pills' manufacturer, SmithKline Beckman Corp.

Nine adulterated capsules of Contac, a cold medicine, Teldrin, an allergy medication, and Dietac, an appetite suppressant, were discovered in March at four stores in Orlando, Fla., and three stores in Houston.

An affidavit released by the Federal Bureau of Investigation said Marks was linked to the pills when a Pacific Stock Exchange executive in San Francisco reported that Marks had purchased 298 "put" options on SmithKline stock March 18 and 62 more March 19, the day radio and television stations began receiving telephone calls about the tainted capsules from a man calling himself "Gary."

No consumers bought the capsules, and the amount of Warfarin, an anticoagulant used to kill rats, was not lethal, federal officials and SmithKline representatives said.

But under a federal law passed after seven people died from cyanide-tainted Tylenol capsules in 1982 in the Chicago area, Marks could be fined $50,000 and jailed for 10 years if convicted. Two people have died from unrelated tampering incidents since the first Tylenol case.

Bretzing said that since SmithKline Beckman stock "did not suffer any hysterical drop," Marks probably did not profit from his alleged stock-manipulation plan.

One stockbroker said Marks could have made as much as $15,000 on a $5,000 investment in a few days if the stock had dropped five points. The stock, at 89 3/4 on March 20, dropped to 88 3/8 March 21 when SmithKline announced that it was withdrawing all its capsules from the market, closed at 88 on March 24, then began to climb again.

FBI agents said Marks was arrested at Thursday night as he was about to get into his car in a parking lot at Los Angeles International Airport after arriving from Boston.

Marks was arraigned here and ordered held without bond. He waived his right to a preliminary hearing and was turned over to U.S. Marshals for transfer to Florida, where he will stand trial.

Bretzing said nearly every regional office of the bureau was involved in tracking down the man who telephoned radio and televison stations in New York, Florida and Texas, announcing that the capsules in Orlando and Houston had been tainted with cyanide or rat poison and demanding that SmithKline make its products tamper-proof.

Bretzing said he thought the calls were made because "he didn't get the publicity he was seeking" to make his stock scheme work.

Agents asked every exchange trading SmithKline stock if they had noticed unusual transactions involving the company at about that time. Charles Rogers, senior vice president of the options division at the Pacific Stock Exchange in San Francisco, reported Marks' transactions of March 18 and 19.

"Put" options give the holder the right to sell stock at a set price for a certain period, allowing an investor to profit from a sharp and unexpected drop in the price of the stock.

Agents discovered that Marks had worked as a clerk in the Merrill Lynch Pierce Fenner & Smith Inc., brokerage office in San Marino, for about a month late last year. A Merrill Lynch source said Marks was fired when a personnel check revealed that he had a criminal record.

A U.S. magistrate said today there were several warrants for Marks' arrest in Massachusetts and he had once been convicted of receiving stolen property in California, the apparent source of fingerprints used by the FBI to match a print taken from a Teldrin capsule seized in Orlando.

The FBI also obtained from ABC News a tape of a March 19 telephone call from "Gary" to Gretchen Babarovic, assistant to ABC News anchor Peter Jennings. Three members of the San Marino Merrill Lynch office staff identified the voice as Marks'.

SmithKline, a Philadelphia-based firm with total sales of $3.2 billion in 1985, has announced plans to resume sales of Contac and Teldrin in late summer with new safeguards against tampering. SmithKline spokeswoman Sharyn Arnold said the products will be sold in solid, elongated "caplets" and in transparent capsules that will allow easier inspection. Each capsule will be sealed with a red gelatin band to prevent easy opening and resealing.

Arnold said the adulterated capsules found in March had visible slits in their packaging and contained visible foreign substances that only a very inattentive consumer would have missed.