Commissioner Arthur Hull Hayes Jr. said yesterday that the Food and Drug Administration erred in the way it switched a controversial asthma drug from being available only by prescription to being sold over the counter.

Hayes said that he may change the rule under which such switches are made, but he defended the drug, metaproterenol, as an appropriate candidate for being sold without a prescription.

The decision last October to switch the status of metaproternol marked the first time that the FDA acted on its own initiative to make such a move, agency officials told a House panel yesterday. Furthermore, they testified, the drug was made a non-prescription remedy virtually without discussion, on the basis of one FDA official's memo.

Hayes was questioned by members of the House Energy and Commerce subcommittee on oversight and investigations for nearly four hours yesterday about metaproterenol, sold under the trade names Alupent and Metaprel. The drug constricts blood vessels in the lungs and, thus, helps asthmatics breathe.

Metaproterenol is controversial because of "an epidemic of death" in some countries after similar drugs were sold over the counter, according to Rep. Albert Gore Jr. (D-Tenn.), although the role of the inhalant in those deaths is still being debated. According to FDA officials, misuse of the drug can result in death or injury.

Beginning last October, the drug was allowed to be sold over the counter in this country. But the FDA reversed itself May 17 after the receipt of 102 letters, 97 of them opposed to selling metaproterenol without a prescription.

Hayes said the policy may be changed again after further review.

James P. Mann, director of the division of surgical-dental drug products at the FDA, said yesterday that it was his four-paragraph memo in December, 1981, and a handwritten approval from the FDA deputy director that put the drug on store shelves without prescription control.

But Mann testified that he was surprised when he saw the drug appear on store counters before the FDA had finished taking comment on whether it should be made an over-the-counter remedy, and called that procedure absurd.

He said he was unaware that the law allows immediate marketing of a drug once it is officially proposed that it be switched from prescription-only to over-the-counter sales.

Hayes said that even though the FDA abided by the law, it was "our error" that medical opinion on the drug was not actively sought, beyond publishing the change in its status in the Federal Register.

Under questioning from subcommittee Chairman John D. Dingell (D-Mich.), Hayes said that it "would be reasonable" to require that the FDA, when it initiates such marketing switches in the future, put them before an advisory committee of scientists before the drugs involved are sold over the counter.