West German Foreign Minister Hans-Dietrich Genscher, ending two days of meetings with leading Soviet officials here, said today that he is "optimistic" that an international agreement banning chemical weapons will be reached this year.

Genscher told journalists that Soviet Foreign Minister Eduard Shevardnadze was also positive on the progress at the ongoing Geneva talks on a chemical weapons ban, involving the Soviet Union, the United States and other countries.

Genscher, in his first trip to the Soviet Union in nearly two years, met for three hours with Soviet leader Mikhail Gorbachev yesterday. The visit is viewed widely as the turning point in three years of sour relations between Bonn and Moscow. "The fact that we want to open a new chapter, lay a new foundation for these relations is shared by both sides," he said.

But, he cautioned that the trip does not represent a "breakthrough," adding that "one must be very careful in using such a big word."

"Acting like partners in a dialogue," Shevardnadze said in a luncheon toast, "we are fully aware of the importance of good relations between our states for the present and future of our peoples, for the situation in Europe."

Shevardnadze also lauded Bonn's support for the beleaguered SALT II treaty, supported by Moscow but not Washington.

However, he added, "regrettably this stand is contradicted by the federal republic's involvement in the U.S. Star Wars program, which devalues the positive pronouncements."

Calling on Washington and Moscow to reach an accord on the reductions of nuclear arsenals in Europe, Genscher told journalists in an hour-long news conference, "It would be better to have an agreement on partial reductions," than no agreement. President Reagan and Gorbachev agreed last year to work toward a 50 percent bilateral reduction in nuclear warheads in Europe. "We would also accept 30 percent, and I think this would represent substantial progress," Genscher said.

Genscher emphasized the need for increased Soviet-West German trade and Shevardnadze concurred, according to the Soviet news agency Tass.

Genscher also sought to revive interest in the human rights accord that the United States rejected at the conclusion of the international conference on human contacts in Bern, Switzerland, last May. After two months of negotiations, the compromise position drafted by neutral countries was rejected by Washington, and Genscher proposed it be broached again in the fall.