Treasury Secretary James A. Baker III told members of the House Ways and Means Committee yesterday that President Reagan is flexible on all but three provisions of his proposed overhaul of the tax code.

Baker said Reagan will insist on preservation of the tax deduction for home-mortgage interest, a top tax rate for individuals no higher than 35 percent, and a decrease in the tax burden on the poor, according to sources present at a closed meeting.

Baker's remarks, delivered at a committee retreat at Airlie House in Virginia hunt country, were notable because they implied that the administration would negotiate on such other controversial items as the termination of the deduction for state and local taxes and the reduction of the corporate tax rate from 46 percent to 33 percent.

Baker was asked whether the administration's firmness on the top personal tax rate also applied to the top corporate rate. He responded that it did not, sources said.

Today, the tax writers were to try to agree on what type of tax revision should emerge from their committee, which will begin writing a bill near the end of this month. Yesterday's sessions of the much-heralded "retreat" were principally taken up with presentations by academic tax experts.

Even there, a touch of conflict emerged, however, as Assistant Treasury Secretary Ronald A. Pearlman squared off against former Council of Economic Advisers chairman Martin Feldstein, sources said. Feldstein, who has returned to teaching at Harvard University, contended that the Reagan tax plan would harm manufacturing industries.

Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.) told the assembled members that he was "absolutely" committed to moving a tax bill through his committee and the House. While he did not specify what ought to be in that tax bill, Rostenkowski said he wants a plan that would produce economic growth and would treat all taxpayers equally, creating a "level playing field" rather than providing special incentives for certain sectors of the economy.

Yesterday was not the first time the Ways and Means Committee has huddled in secret. Last October, members retreated to Patrick Air Force Base in Florida to discuss tax revision.

With an administration proposal on the table and bill-writing sessions nearing, this weekend's sessions have raised far more concern among lobbyists than the last one. Members said yesterday that they had been peppered with telephone calls from representatives of interest groups asking legislators to make a pitch for them at the retreat.

In his St. Louis office Friday, Rep. Richard A. Gephardt (D-Mo.) had a steady stream of unannounced visitors worried about the meeting.

"I was just deluged with people calling the office, coming to see me and passing me notes," Gephardt said. "Everybody's gone crazy."

Rep. Robert T. Matsui (D-Calif.) said he had received "I can't tell you how many" phone calls from Washington and from his Sacramento district.

Even the academics who made presentations at the retreat said they had received piles of studies and documentation from interest groups pleading their cases. Several received packets from the hamburger chain Burger King via Federal Express, although it could not be learned what Burger King was asking for.

If the administration agrees to compromise on the corporate tax rate, it could lose much of the business support for its plan. Several of the organizations working for the proposal have said their participation depends on a corporate rate of 33 percent and no higher.

Already, some business groups are losing heart. A large coalition of small-business groups expressed dismay late last week at the Treasury Department's decision to remove from its plan a proposal to link the value of inventories -- unsold goods -- to inflation for taxation purposes. The amendment to the plan was made to ensure that the proposal would bring in the same amount of money as the current tax code, so that the federal deficit would not be increased.

During summer hearings held by Ways and Means, it became clear that a committee compromise would emerge on deductibility of state and local taxes and that the Reagan proposal to repeal the deduction for all income, property and sales taxes would not be adopted.