President Carter said today that he would sign legislation to extend federal price controls on domestic oil, if it passed. But, he added, "there is not a chance in the world" that such a measure could survive a Senate filibuster.

In a news conference dominated by energy questions, Carter predicted a continued worsening of gasoline shortages around the country and endorsed California Gov. Edmund G. (Jerry) Brown's plan to institute an odd-even-day gasoline allocation plan in that state.

Speaking of Congress' reluctance to approve his standby national gasoline rationing proposal, the president said, "We may have to have a few demonstrable shortages-as is happening now in California-to show that this (stand-by plan) is necessary."

Beginning a trip to two key states in the 1980 presidential nominating process, the president conceded at his news conference that he was reluctant to answer the question about extending oil price controls because of its possible impact on the administration's proposed "windfall profits" tax on the oil industry that Carter wants to accompany decontrol.

"I certainly will not veto it," the president said when asked if he would support an extension of controls. "We would live with it."

But he quickly added:

"My judgment is that, no matter what the House does, the Senate will never pass an extension of oil price controls."

Carter also said that he is "deeply concerned" about the safety of nuclear power reactors and that the country should turn to nuclear power only as "a last resort." But in response to a question, and in a prepared statement denouncing congressional efforts to continue the Clinch River nuclear breeder reactor project, the president gave no hint that he would support turning away from Nuclear energy as an energy source.

The breeder reactor at Clinch River, Tenn., produces its own nuclear fuel and also produces weapons grade plutonium that can be used to fashion nuclear weapons. Carter has long opposed it as posing a threat of a further spread of nuclear weapons.

Criticizing the House Science Committee's vote Thursday to continue funding the project, Carter renewed his fight against the breeder reactor calling it "a technological dinosaur" and " a waste of more than $1.5 billion of taxpayers' money."

The president called for further efforts to improve the safety of existing nuclear reactors, calling this "the preeminent concern," and said he believes accidents such as the one at Three Mile Island, near Harrisburg, Pa., can be prevented in the future.

Carter's answer to the question of extending price controls on domestic oil was the latest episode in a delicate fencing match he has been conducting with Congress. Under law, the controls will expire in September 1981, but the president has ordered a gradual lifting of the controls to begin June 1, suggesting that congressional refusal to extend the controls left him no choice.

Opponents of decontrol, however, have challenged that assertion in the maneuvering over who will bear the most political blame for the higher energy prices that decontrol is certain to bring.

Earlier today, Carter told a group of local Iowa officials that he would support a trade of American farm products for oil from Mexico. He said he will discuss this idea with Mexican government officials Saturday in Los Angeles.

On the other topics today, the president:

Conceded that Senate approval of a new nuclear arms treaty with the Soviet Union "is in doubt" and appealed for help.

Predicted a reduction in inflation "in a few months," but did not cite the source of his optimism.

Before the news conference, the president spoke to the Iowa State Association of Counties, where he announced a series of programs and other actions designed specifically to appeal to rural voters.

Carter also spoke about inflation and energy - his two principal domestic political problems - and told the local officials there are no simple solutions.

"There is no doubt that Americans are afraid that we are going to wind up with worthless money and no gas," he said. "And as these fears grow, based on daily headlines and based on daily experiences, so do the demands grow for some quick, simple and painless solution. So now Washington is full of people selling snake oil cures for inflation or telling science fiction stories about how the energy crisis might be resolved overnight."

Referring to the political problems this has caused him, the president said, "When food prices go up, the city dwellers are raising Cain; if food prices go down, the farmers are extremely unhapply. Sometimes I don't know whether it is harder for a president to try to establish peace in the Middle East or peace in the Middle West."

But Carter said inflation was "born originally from overindulgence, too much spending with tax reductions combined," and said it "cannot be fought by the way people usually expect the federal government to address a problem - by appropriating vast sums of money for it."

From Des Moines, Carter flew this afternoon to San Francisco, where tonight he attended a fund-raising performance to benefit the family of George Moscone, the San Francisco mayor who was shot to death in his city hall office last Nov. 27.

The president was scheduled tonight to go on to Los Angeles, remain there overnight, and on Saturday to attend a Mexican-American Cinco de Mayo celebration.

The journey was an example of selective presidential travel, with the stops chosen, at least in part, with an eye on the 1980 presidential election campaign.

Last week, after delivering an arms limitation speech in New York, Carter flew north to make two appearances in New Hampshire, traditionally the site of the nation's first presidential primary.

Iowa, the president's first stop today, was the state that gave Carter his first important boost in 1976 when the then little-known former Georgia governor led the field in Democratic caucus voting that preceded the New Hampshire primary.

The California primary comes near the end of the presidential nominating process. But it offers a rich prize in convention delegates and it is the home state of one political figure who is considered almost certain to challenge the president for the nomination, Gov. Brown. CAPTION: Picture, Walking to the site of his news conference, the president greets Iowans in Des Moines on first leg of trip.UPI