The government's ranking health official urged medical schools yesterday to train fewer doctors and help prevent a "looming" oversupply of physicians that he said could add billions of dollars to health care bills.

In a reversal of the federal policy that poured millions of dollars into new schools to increase the doctor supply, Health, Education and Welfare Secretary Joseph A. Califano Jr. said the government "will not encourage or assist the creation of new medical schools except under the most compelling circumstances."

Also, he said, "it is our hope, indeed our objective, that over the next few years the medical schools will gradually decrease the size of their classes."

In the 1960s, Califano said, "it appeared that we faced a national doctor shortage," but today some areas - for example, the state of Rhode Island - are reporting a doctor surplus.

The result, he said, can be waste, since "the chief effect of physician oversupply is dramatically rising costs "without corresponding improvements in health, though "some health benefits" do take place.

He quoted an Association of American Medical Colleges estimate that every additional doctor in practice, needed or not, boosts total health spending (in fees, drugs, hospital care, etc.) by $300,000 a year.

Health experts in and out of government have been saying for the past few years that the country needs to reconsider its headlong rush to train more doctors. In a speech scheduled for delivery to the Districts of Columbia Medical Society Saturday, Columbia University economist Eli Ginsburg blames much of the nation's health-cost inflation on "rapid, largely uncontrolled inputs of physician and hospital beds."

The Department of Health, Education and Welfare began cutting off grants to help open medical schools three years ago. But it did not until yesterday reverse its requirements that schools receiving construction aid - $806 million worth since 1965 - increase class size.

This year Morehouse College is Atlanta opened a new medical school to train more black doctors with the aid of $5 million HEW construction grant. An East Tennesee Medical School opened with Veterans Administrations help.

"The secretary is saying now that there will be no new medical schools, be they majority or minority," though HEW will keep trying to increase minority enrollments, said Dr. Henry Foley, head of HEW's Health Resources Administration.

Medical college leaders agree fully with Califano, said Dr. John A.D. Cooper, President of the Association of American Medical Colleges, which Califano addressed in New Orleans yesterday.

The county now has 124 medical schools, with "eight to ten more in the talk or fund-raising stage," said AAMC official Charles Fentress.

Califano said HEW will also move to stem the creating of medical super specialists and encourage training of family doctors instead. Cooper said the medical schools agree here too.