President Reagan's unusual midday appeal from the Oval Office yesterday for his Nicaraguan aid package was the culmination of an acrimonious struggle among White House aides over how to capture the handful of House votes needed for a victory, administration officials said.

The internal debate erupted into a heated argument at the White House senior staff meeting yesterday over whether Reagan should give a speech at all, the officials said.

The argument touched on larger problems Reagan has encountered in his efforts to persuade Congress to approve his proposed $100 million in military and economic assistance to the rebels -- one of the most difficult selling jobs of his presidency.

The officials said discussions were held late last week about a possible Reagan speech to one or both Houses of Congress. House Minority Leader Robert H. Michel (R-Ill.) was informed of the idea Friday when he met with Reagan's National Security Adviser John M. Poindexter and other presidential aides.

Michel, according to the officials, was seeking a direct presidential lobbying effort on behalf of the modified aid package he had assembled with some moderate House Democrats, but he expressed reservations about another Reagan speech.

While Reagan took a draft of a possible speech with him to Camp David over the weekend, aides continued to discuss it.

On Monday afternoon, White House chief of staff Donald T. Regan telephoned House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) to ask whether the president could speak directly to the House, and was rebuffed.

Regan was "taken aback" by O'Neill's rejection, and privately expressed anger and frustration at the speaker's rebuff, knowledgeable officials said. "It was not a pleasant conversation," said one.

At the same time, congressional sources said the White House failed to discuss such an appearance with the speaker in advance -- the kind of groundwork that the White House has often laid in the past, and should have had Reagan, not Regan, make the request.

O'Neill offered Reagan a chance to address a joint session of Congress, but the White House turned it down.

Yesterday morning, in debating their next move, sharp words were exchanged among White House aides. Some, including Communications Director Patrick J. Buchanan, urged that Reagan deliver a nationally televised speech during prime time to demonstrate that he was willing to go "the extra mile" for the Nicaraguan rebels, officials said.

But Dennis Thomas, a deputy to Regan, fired back that such an address would not help garner the necessary half dozen or so votes in the House. Thomas has argued in the past that the best legislative strategy for Reagan on this issue is private lobbying, in part because high-profile speeches have often generated as much opposition to Reagan's position as support.

After meeting with Regan and Vice President Bush, the president, following the chief of staff's advice, decided to deliver the speech on television at noon, the time at which he would have been addressing the House.

Reagan struck a conciliatory tone in his address from the Oval Office yesterday, making references to former presidents Truman and Kennedy and current Democratic leaders Sen. Sam Nunn of Georgia and House Armed Services Chairman Les Aspin of Wisconsin.

Saying that Nicaragua could become a "Soviet military beachhead inside our defense perimeters" that would threaten the United States, Reagan added, "A future president and Congress will then face nothing but bad choices, followed by worse choices . . . . Do we want to be the first elected leaders in U.S. history to put our borders at risk?"

The president also acknowledged that human rights abuses by the rebels "have occurred in the past," and said "they are intolerable," although he termed some of the charges "Sandinista propaganda." He said he would welcome the appointment of a bipartisan congressional commission to oversee U.S. aid to the rebels.