A chastened Republican-controlled Senate Agriculture Committee yesterday backed away from its earlier votes to bust the budget and adopted a 1981 farm bill much closer to the spending levels the administration has proposed.

Even so, the price-support and loan program for basic farm commodities contains provisions that may be unpalatable to the White House.

As one of the first committees to handle specifci authorizing legislation under the board Reagan budget umbrella, the panel caused dismay caused dismay two weeks ago by adopting a package that would have cost about $1.6 billion more next year than the president wanted.

Through a series of cancuses and closed-door meetings during the last week, the committee tailored a new measure cutting about $1 billion from its earlier product.

Sen. Richard G. Lugar (R-Ind.) set the tone of new-found rectitude just before the compromise was pushed through yesterday with little debate. "This committee has been held up to ridicule by everybody in America for breaking the bank," he said, announcing that he would oppose any more increase.

The compromise on wheat, feed grains, cotton, rice, peanuts, milk, sugar and an export credit revolving fund was adopted on a 12-to-1 vote, with Sens. Patrick J. Leahy (D-vt.) and Edward Zorinsky (D-Neb.) voting "present."

The lone opponent, Sen. John Melcher (D-Mont.) said, "Dairy people are not going to like this, and when the commodity producers realize this bill does not envision their keeping up with costs, they are going to feel disillusioned and abandoned. I think this bill will damage the economy of the entire country."

If farmers will not be pleased, neither, apparently, will the administration, which fell considerably short of achieving the policy changes it had sought in the proposal drawn up by the Agriculture Secretary John R. Block.

"We are going to want visitation rights on amendments when this bill goes to the floor," a department official said after the committee completed its work.

Yesterday's package carries an estimated first-year cost of $2.4 billion, which is not only over the Reagan budget but $300 million more than the Senate budget resolution allows.

Major differences from the Reagan proposal include:

Mandated loan rates, slightly above this year's, for the key commodities, and less discretionary authority for the the secretary to set the rates.

A dairy support compromise, engineered by Sen. Rudy Boschwitz (R-Minn.), aimed holding down govrnment purchases of surplus milk. Reagan's proposed would have cost about $943 million. The approved version is estimated at $1.093 billion for the next fiscal year.

Resurrection of a sugar price-support program; continuation of the target-price concept on grains, which provides direct payment rather than loans to farmers; and continued, higher support levels for peanuts. The administration opposed all three elements of the package.

As the Senate committee was moving with dispatch, its House counterpart began a laborious process of fashioning a farm bill from pieces produced by its subcommittees -- all, apparently, well above budget limits.

Chairman Kika de la Garza (D-Tex.) conceded that the bill goes beyond the $1.7 billion limit ordered by the House in its budget resolution last week. But after that, he complained, all is confusion.

The committee package would cost about $3.6 billion. "I'm trying to figure out where cost about $3.6 nobody knows," de la Garza said. "My frustration is that Mr. Gramm [Rep. Phil Gramm (D-Tex.)] and Mr. Latta [Rep. Delbert L. (R-Ohio)] and the president get on TV and say we have to save America. All I want is to get guidance on how we are going to do it and I can't get guidance from anyone."