Soviet leader Mikhail Gorbachev told President Reagan yesterday that the Soviet Union is willing to withdraw its troops from Afghanistan over a 12-month period but refused to set a date for the pullout to begin, administration officials said yesterday.

The Afghanistan discussion in the Oval Office did not provide a breakthrough on this politically vital subject, as officials had earlier hoped. Nor was there any outward sign that the second day of the Reagan-Gorbachev summit had produced fundamental progress on any of the other major issues, although working groups of officials continued discussions into the night.

Beneath a large portrait of Lenin at a dinner in Reagan's honor at the Soviet Embassy, Gorbachev said last night, "It is my impression that we have made headway on a number of important issues and this is cause for optimism. At the same time, in some areas we remain far apart."

The summit meetings are to end this afternoon with public statements by the two leaders and Gorbachev's departure this evening after a news conference.

The 12-month timetable for withdrawing the estimated 115,000 Soviet troops is shorter than Gorbachev has offered in the past, but it is the same as that made public by Afghan President Najibullah on Nov. 30, evidently with Soviet approval. Reagan and other senior U.S. officials said prior to Gorbachev's arrival that the crucial question was establishing a "date certain" for the beginning of the Soviet pullout.

On long-range nuclear arms, U.S. and Soviet negotiators were reported to be making progress establishing "sublimits," or ceilings on different types of weapons as part of an overall cutback of 50 percent in the vast strategic arsenals of the superpowers. But this progress, according to official sources, is conditional on agreements on space defense issues surrounding Reagan's Strategic Defense Initiative (SDI), which prevented final agreement at the October 1986 Reykjavik summit.

The arms negotiators headed by U.S. Ambassador Paul H. Nitze and Soviet Marshal Sergei Akhromeyev planned to continue working last night and to report their conclusions to Reagan and Gorbachev before the final White House meeting of the summit, scheduled to begin at 10:30 a.m. today.

Akhromeyev was accorded extraordinary access to the Pentagon, where he met Secretary of Defense Frank C. Carlucci and Lt. Gen. James A. Abrahamson, director of the SDI program.

After the celebration and good feeling of the opening day of the summit Tuesday, which was marked by signing of the Intermediate-Range Nuclear Forces (INF) Treaty and the fervent expression of high hopes for additional gains, Reagan, Gorbachev and their senior negotiators and advisers got down to the hard business of detailed U.S.-Soviet negotiations on strategic arms cutbacks, settlement of bloody regional conflicts such as Afghanistan and the Iran-Iraq war and other issues.

"This was a day of heavy lifting," said White House spokesman Marlin Fitzwater. "It's in these middle chapters of the summit that the issues are joined and the plot is revealed. And tomorrow we reach for the conclusions," he added yesterday.

The most important event in the second day of the Washington summit was the two-hour Oval Office meeting in mid-morning that began with an unusually intimate 11-minute meeting of Reagan and Gorbachev with only their translators present and even official note-takers excluded. The meeting went into what Vice President Bush called "a very vigorous exchange on the strategic arms talks" and a "very frank" discussion of Afghanistan and other regional issues with "no holds barred."

It was also a day in which Gorbachev met nine senior members of Congress at the Soviet Embassy, made a hopeful speech at a State Department luncheon in his

Gorbachev's news conference will be broadcast today at 5:30 p.m. Reagan's speech will be at 9 p.m.

honor on building "a safer and more democratic world," spoke to a group of leading U.S. publishers and editors, and hosted a dinner at the embassy for Reagan and other top officials.

On Tuesday, Reagan and Gorbachev described their INF pact as a possible pivotal point in the history of the world's two leading powers between a troubled, sometimes hostile past and a more constructive future. On the surface, at least, the most notable evidence of change in yesterday's events was on the U.S. side, specifically a shift in the positions and attitudes of some key lawmakers after their morning meeting with Gorbachev.

This was especially true in the case of Senate Minority Leader Robert J. Dole (R-Kan.), who said after the meeting that he supports the INF Treaty "in principle" and predicted it will be ratified without crippling amendments. Dole, a presidential candidate who had previously avoided taking a position, said he hopes to work for ratification by a wide margin.

House Majority Leader Thomas S. Foley (D-Wash.) said he expects "bipartisan support" for the treaty and expressed optimism that Reagan and Gorbachev will sign a strategic arms treaty in Moscow next spring.

Foley raised the possibility, previously suggested by Carlucci, that such a treaty might be signed by Reagan and submitted to the Senate in 1989 by his successor.

Foley raised human-rights issues with Gorbachev. And Senate Majority Leader Robert C. Byrd (D-W.Va.) brought up the Afghanistan issue in the free-wheeling discussion with him. Byrd said he had told Gorbachev that a "definitive and realisitic timetable" for Soviet troop withdrawal would be helpful to ratification of the INF accord.

The lawmakers said Gorbachev appeared sensitive to criticisms from some members of Congress. Sen. Alan Cranston (D-Calif.) quoted him as saying, "We have our conservatives, too," in apparent reference to conservative opposition to the treaty.

During an afternoon meeting with U.S. publishers and editors, Gorbachev gave an emotional defense of the Soviet Union's record on human rights and emigration. He said western leaders will "get nowhere" if they seek to put his country in the dock on human rights.

According to participants, Gorbachev reacted indignantly when Random House publisher Robert Bernstein asserted that two-thirds of the political prisoners in the Soviet Union have not benefited from government amnesties this year. Gorbachev responded with a 10-minute answer during which he compared the Soviet criminal code favorably with those of the United States, West Germany and France.

Gorbachev said that, during talks with Reagan yesterday, "I told the president that you are not the prosecutor and I am not the accused. We have to strike a balance here; otherwise you will get nothing out of us."

Gorbachev told lawmakers and publishers that he is prepared to launch a joint seminar on human rights to be sponsored by Congress and the Supreme Soviet, the Soviet national legislature. He said the Soviet Union had its own criticisms to make of the United States for failing to ratify international conventions on social and economic rights.

At the end of the meeting with the publishers, the Kremlin chief said he had been "very sincere . . . perhaps over-emotional" in his remarks.

In reply to a question by Washington Post Co. Chairman of the Board Katharine Graham, Gorbachev said he would like to get to know the United States better and would be prepared to return to the United States "if the Politburo and God are well-disposed."

In an exchange of toasts at the Soviet Embassy last night, Reagan returned to the themes of realistic cooperation in the cause of peace that have dominated the ceremonial events of the summit.

"Mr. General Secretary. . . we've come to this summit without illusions, with no attempts to gloss over the deep differences that divide us, differences that reach to the core of values upon which our political systems are based," Reagan said.

". . . But perhaps, in this Christmas season, we should look at an even deeper and more enduring realism. . . . It is the reality that binds each of us as individual souls -- the bond that united Soviets and Americans in exultation and thanksgiving on that day of peace 42 years ago" when World War II in Europe ended in Allied victory.

On Tuesday night, at the State Dinner hosted for him and his wife, Raisa, by the president and First Lady Nancy Reagan, Gorbachev gave a spirited defense on reform efforts in the Soviet Union, according to Rep. Dick Cheney (R-Wyo.), who was seated at Gorbachev's table.

Cheney said he asked Gorbachev about internal opposition to change. The congressman said Gorbachev replied that it will not be easy to transform Soviet society, but said, "It must be done, and we will never have another opportunity."

As a sign of improving relations, Secretary of State George P. Shultz and Foreign Minister Eduard Sheverdnadze signed three agreements at the State Department in mid-afternoon, including a pact that sets up the first non-stop, round trip flights between Moscow and New York. The others are an agreement on testing seismic devices that measure the size of nuclear blasts and a cooperative arrangement on environment research in the world's oceans.

The issue of Afghanistan was seen to be of particular importance in this week's talks because such regional disputes have the potential to undermine arms-control accords, as the Afghan invasion of 1979 did to the unratified 1979 SALT II treaty, and because of recent hints by Moscow that it is preparing its promised withdrawal.

Gorbachev said in an NBC television interview last week that he would discuss the timetable for withdrawal with Reagan. "I believe that if the American administration really does sincerely want that problem to be resolved, to be closed by political means, it could be done very quickly," Gorbachev said at that time.

A White House official said that in the Oval Office discussion yesterday, Gorbachev was "doctrinaire" about Afghanistan. "It appears he doesn't have much flexibility."

The official added that it is difficult for Gorbachev to set a date on U.S. soil for the withdrawal to begin, presumably because this would appear to be a concession in Washington that could have devastating impact on Soviet-sponsored groups in Kabul.

There were indications from the White House that in February, when the next round of U.N.-sponsored talks between Pakistan and the Afghan regime may be held, the Soviets might reveal a date for the beginning of their withdrawal. A Soviet official recently told Undersecretary of State Michael H. Armacost that the next session of the 5-year-old U.N. talks should be the last.

Cutting off U.S. aid to the Moslem rebels fighting the Marxist Kabul regime also was discussed in the Oval Office and in a working group of U.S. and Soviet officials, according to administration sources.

Gorbachev, according to a White House official, demanded to know from Reagan when this aid would end. Reagan stuck to the position that the first thing to be settled is the date and duration of the Soviet withdrawal, and he said that there should be no preconditions on the Soviets getting out, the official said.

Reagan, in an interview with four columnists following his Oval Office meeting with Gorbachev, noted that the Soviet leader had said publicly as well as privately that "they want to get out of Afghanistan." Reagan added that "I can't go beyond that, other than saying that. . . the people we have working on all these things are working on that particular question right now as to when and how."

Until Nov. 30, Moscow and Kabul backed a 16-month Soviet troop withdrawal. Pakistan most recently has demanded an eight-month pullout. Thus, the 12 months proposed by the Afghan government at the end of last month and now confirmed to Reagan by Gorbachev, comes halfway toward the Pakistani position.

On a related issue, U.S. officials said they see no shift so far in Moscow's reluctance to agree to a U.N. Security Council resolution imposing a worldwide arms embargo on Iran because of its refusal to stop the Iran-Iraq war on U.N.-proposed terms.

Soviet Foreign Ministry spokesman Gennadi Gerasimov said at midday that the time "hasn't come yet" to impose a U.N. arms embargo on Iran, as proposed by the United States and other western powers. He indicated that a Soviet proposal for a U.N. naval force in the Persian Gulf to replace U.S. and Western European fleets is still under discussion. Administration officials said they consider this plan impractical and unacceptable.

Staff writers Helen Dewar, Michael Dobbs, David Hoffman, Molly Moore and Kathy Sawyer and staff researcher Michelle Hall contributed to this report.