House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), responding yesterday to a strongly worded appeal by Secretary of State George P. Shultz, withdrew a resolution asking the Reagan administration to submit two pending nuclear test-ban treaties to the Senate for ratification.

Shultz, in a letter to O'Neill dated Sept. 23, said he feared that adopting the resolution now could "seriously undermine" the U.S. position at the Geneva arms limitation talks and "weaken the president's hand" as he prepares for his scheduled Nov. 19-20 summit in Geneva with Soviet leader Mikhail Gorbachev.

"Now is not the time to project an image of internal discord on arms-control matters," Shultz wrote.

Kirk O'Donnell, a senior aide to O'Neill, said the speaker decided Tuesday to withdraw the resolution, which was scheduled for debate and a vote yesterday.

O'Donnell said O'Neill has always tried to comply with Shultz's requests on foreign-policy matters and noted that Shultz's plea to put off a vote on the resolution was "quite strong."

He said O'Neill remains a strong supporter of the resolution and intends to bring it back to the House floor after the Geneva summit.

Another O'Neill aide, who asked not to be identified, said, "The speaker has been going out of his way to give President Reagan the greatest possible opportunity at Geneva."

It was also clear that O'Neill feared exposing House Democrats to charges of undercutting Reagan at the summit if the speaker forced a vote on the resolution.

The resolution asks the administration to submit for Senate ratification the Threshold Test Ban Teaty, signed by President Richard M. Nixon in 1974, and the Peaceful Nuclear Explosions Treaty, signed by President Gerald R. Ford in 1976.

The threshold treaty would ban all underground nuclear weapons tests of more than 150 kilotons. The other treaty would ban all peaceful underground nuclear explosions of more than 150 kilotons for single devices and 1,500 kilotons for multiple devices.

The resolution also calls on the administration to propose an immediate resumption of negotiations for a verifiable comprehensive nuclear test-ban treaty.

Rep. Edward J. Markey (D-Mass.), a chief sponsor of the resolution, said he was informed of O'Neill's decision Tuesday night and wanted to discuss it with O'Neill before commenting.

The other main sponsor of the resolution, Rep. Jim Leach (R-Iowa), said he was "baffled" by the administration's opposition to the measure.

Leach said there was "some legitimacy" to the timing issue just before the Geneva summit but added that the resolution was designed to strengthen Reagan's position by demonstrating that Congress is receptive to new arms-control agreements and wants pending treaties reached with the Soviets put into force.