President Reagan is considering relaxing export controls on the sale of oil and gas equipment to the Soviet Union, the White House said yesterday. If taken it would be the second step within a week to reduce trade irritants between the two superpowers.

But in making a decision, the president will be caught between conflicting recommendations from key advisers, with Secretary of State George P. Shultz and Commerce Secretary Malcolm Baldrige recommending that the trade curbs be relaxed, and Defense Secretary Caspar Weinberger opposing the move.

The White House consideration of further gas and oil equipment sales to Moscow follows the announcement last Thursday of a new long-term agreement for the Soviets to buy American grain.

White House spokesman Larry Speakes said the president appeared to be leaning toward a partial lifting of the export controls, which first were put in place by President Carter in July 1978 to protest the jailing of two Soviet dissidents and which were broadened to include grain sales in January 1980 after the Soviet invasion of Afghanistan.

In late 1981, Reagan added a ban on U.S. companies selling equipment for the construction of the Soviet's natural gas pipeline to Western Europe, as an expression of U.S. concern over the Soviet role in Poland's martial law crackdown on Solidarity.

Speakes called the partial lifting of the ban "a technical adjustment, not a major change," and Commerce Department officials said it would merely remove a requirement that exporters of certain oil and gas equipment get a license that is given almost automatically. White House, State Department and Commerce officials all took a low-key approach in discussing the possible easing of curbs, emphasizing that it would just affect heavy duty equipment, not high technology.

The principal beneficiary of any partial lifting of controls would be Caterpillar Tractor Co., the only company in the country that makes pipelaying machinery needed by the Soviet Union.

Moscow has bought 1,500 pipelayers in the past year--none from Caterpillar, which had been a major supplier. Caterpillar had received a $90 million order for 200 pipelayers that was canceled when the Reagan administration tightened trade sanctions during the Polish crisis.

Although licenses to export the giant $300,000 pipelayers are granted almost automatically, Caterpillar officials said the need for special permission made the Soviets wary and underscored America's reputation as an unreliable supplier.

The other possibility, considered less likely to receive presidential approval, would include equipment such as beam welders and high-quality drill bits.

Caterpillar Chairman Lee L. Morgan, who also heads the Business Roundtable's international trade task force, has been pushing hard in Washington for an easing of export curbs to the Soviet Union.

There was some speculation in Washington trade circles that the White House action is being taken to win Morgan's support for the administration's trade reorganization bill, but both Commerce and Caterpillar officials denied any connection between the two. One Commerce official went so far as to hope Morgan never supports the bill to erase any hint of a deal having been cut.

Last week's grain agreement, which allows the Soviets to increase their minimum purchases each year by 50 percent for the next five years, is considered worth $7 billion to $8 billion a year to American farmers.