WARSAW, AUG. 22 -- Soviet President Mikhail Gorbachev urged the Polish Communist Party today to enter the new Solidarity-led government, saying that Poland's problems cannot be solved without the Communists' participation, a party spokesman announced. Gorbachev's views, his first direct comment on the imminent end of 45 years of Communist rule in Poland, were conveyed in a 40-minute telephone conversation with the Polish party's leader, Mieczyslaw Rakowski, according to party Central Committee spokesman Jan Bisztyga. Speaking at a news conference, Bisztyga also announced that the party's ruling Politburo, meeting this afternoon, condemned as illegal and immoral the Aug. 23, 1939, Nazi-Soviet non-aggression pact that led to the division of Poland between Soviet and German forces the following month. The Politburo's statement was the latest in a series of moves by the Polish Communists to display independence from Moscow and align themselves with Polish nationalist feelings. It was issued on the eve of the pact's 50th anniversary, which will be marked by protests in the three Baltic republics -- Lithuania, Latvia and Estonia -- that were absorbed into the Soviet Union in 1940 under a secret protocol to the accord, also known as the Molotov-Ribbentrop pact. "Polish society," the Politburo said, "feels that the steps taken by the signatories . . . were violations not only of international law and treaty obligations to Poland, but also of sacred moral norms of international coexistence." Bisztyga said Gorbachev and Rakowski held a "friendly conversation" about "Polish and Soviet political developments." He said Gorbachev "expressed confidence that the Polish party would successfully solve the country's social and economic problems in the interest of socialism and voiced the conviction that solving these problems is impossible without the party." The Communist Party spokesman also announced that negotiations began today on the party's role in the new government being formed by Solidarity's first prime minister-designate, Tadeusz Mazowiecki. Politburo member Leszek Miller represented the Communists, Bisztyga said, while Sen. Jaroslaw Kaczynski, who served as Solidarity leader Lech Walesa's envoy in the talks that led to the new ruling coalition, represented Mazowiecki. Mazowiecki, meanwhile, met with the Communists' floor leader of the Sejm, or lower house of Parliament, Marian Orzechowski, as part of a round of meetings with legislative leaders of all parties. The Sejm will reconvene Wednesday to consider Mazowiecki's nomination as prime minister, although Speaker Mikolaj Kozakiewicz said it will not vote until Thursday. In an interview, Kozakiewicz -- a member of the Peasants' Party, which left the Communist coalition last week to ally itself with Solidarity -- predicted that Mazowiecki would be approved without difficulty. Today, Mazowiecki's nomination was endorsed by leaders of the other newly allied party, the Democrats, and, more surprisingly, by the Pax Catholic Association and the Christian Social Union, two of the three small parties still allied with the Communists. Solidarity, the Peasants' and the Democrats together account for 264 of the 460-member Sejm. The Communists have 173 seats, and their Catholic allies hold 23 seats. Over the weekend, the Communist Central Committee issued a statement warning that the party would take responsibility for Poland's future only to the extent that it was represented in the new government. The statement, widely interpreted as a demand for more cabinet seats than the defense and interior portfolios already promised by Solidarity, was denounced by Walesa on Monday as "threats and blackmail." But, at the news conference, Bisztyga read other sections of the Central Committee statement, which welcomed Solidarity's cooperation in a "broad coalition" government. "This is not a threat," he declared, "but a clear proposal that the Communist Party join Solidarity in the government." Pressed on how many, and which, ministries the party wants, the party spokesman avoided specifics, insisting that negotiations had only begun. Most discussion has centered on the Foreign Ministry, which during last spring's "round-table" talks between the Communists and Solidarity had been linked with the defense and interior ministries as security-related posts that Moscow would not let the Communists yield. Sejm Speaker Kozakiewicz said his Peasants' Party colleagues were wrong in seeking the Foreign Ministry for their party chairman, Roman Malinowski -- a move he said they made as a face-saving way to remove Malinowski from the party leadership. Malinowski served as a deputy prime minister under martial law in 1981-83 and is unpopular with the Peasants' Party legislators whose pressure led to last week's break with the Communists after 40 years as junior partners. Instead, Kozakiewicz argued, Mazowiecki should retain Tadeusz Olechowski, the "exceptionally good foreign minister" in the outgoing Communist government and a "very skilled professional" who "has never been an apparatchik." "Our relations with the socialist states have become very delicate," the speaker said, and a non-Communist minister would have little influence in defending the new Polish government's actions before other Warsaw Pact countries. Kozakiewicz said he planned to try to persuade Mazowiecki that he should not exclude qualified experts from his government "only because they are members of the Communist Party." Kozakiewicz praised the choice of Mazowiecki, whom he called "a very balanced person, very moderate, because he is wise," and said the choice "diminishes the risks of too adventurous politics." As prime minister, Kozakiewicz said, Walesa "would be a disaster." The speaker said he expects that "many strikes will end because of hope, because of the psychological impact of this prime minister." He expressed the wish that the new government has "six months of this, a small injection of hope . . . to heal everything in our economy that is possible to be healed, in supplies to the market, in inflation." But "if this fails, it would be very dangerous, especially for Gorbachev," the speaker said, "because then Poland could be used as proof that his liberal policies toward Poland and Hungary and his opening toward the United States were a mistake."