David Cameron is to dispatch the most senior gay member of his frontbench team to Poland to encourage the Tories' rightwing allies in the European parliament to abandon their homophobic views.

In a move designed to defuse criticism in tonight's leaders' television debate that the Tories have allied themselves with extremists in the EU, Cameron has revealed that the shadow environment secretary, Nick Herbert, will attend a gay rights march in Warsaw in July.

Cameron told the Guardian that Herbert's trip to Poland is designed to persuade the highly conservative Law and Justice party to embark on a "journey" to moderate its views on sexuality.

The party was founded by the late Polish president Lech Kaczynski, who died earlier this month in a plane crash in western Russia. Kaczynski banned gay rights marches in Warsaw when he was the city's mayor.

Nick Clegg, who supported British membership of the euro, and Gordon Brown are expected to use the second TV debate tomorrow night to embarrass the Tories by highlighting the party's links with hard-right groups in the European parliament.

Last week's broadcast electrified the election campaign and Clegg will be hoping to maintain the momentum that it gave the Lib Dems. He goes into tonight's debate with his party in second place, up one point, on 27% in a ComRes poll for ITV/the Independent. The Tories are unchanged in first place on 35%, while Labour trails in third place, down one point on 25%.

Amid nerves among cabinet ministers that Labour is heading for a defeat along the lines of its performance in the 1983 election under Michael Foot, the foreign secretary, David Miliband, today accuses Cameron of adopting an "isolated and weak" position on Europe after abandoning the main centre-right grouping in Strasbourg to sit in the new European Conservatives and Reformists group.

This includes the Czech ODS party, whose founder, Vaclav Klaus, has questioned global warming, and Roberts Zile, of Latvia's Fatherland and Freedom party, some of whose members attend a ceremony to commemorate members of the Latvian legion of the Waffen-SS.

Cameron says the Tories have responded to these concerns by asking Herbert to travel to Poland. He said: "We would not join with parties that had unacceptable views. But we do recognise that, particularly in central and eastern Europe, there are parties that have still got some way to go on the journey of recognising full rights for gay people. We are helping them make that journey."

Cameron added that Labour and the Lib Dems were in no position to lecture the Tories about their new group. "I would say there are partners of the Liberal Democrats who refer to homosexuality as a plague. How many times have you read that in the Guardian? There are partners of Labour that were collaborators with the communist regime in Poland that locked people up and was responsible for appalling human rights abuses.

"Our point is that it is good to have a new group that is against a federal Europe, that wants free trade, co-operation and progress in Europe. And yes, some countries, particularly some of the Catholic countries, do have very conservative social views. They are on a journey in respect of that and it is a journey we can help them with."

But Miliband will warn that Cameron's stance on Europe shows he is incapable of leading change. "Since they have failed to change themselves they have little hope of changing the country, or reforming Europe," he will say in a speech in Bristol. "The Tories are frightened of Europe which makes them isolated and therefore weak in Europe. They want to retreat and defend, not engage and lead. They have outlined a policy plan based on isolation, confrontation and weakness."

The foreign secretary will claim that Labour resolved its bout of Europhobia – which had led the party to stand on a platform to withdraw from the then EEC in 1983 – in the late 1980s.

"We took on the disease, rooted it out, and became a strong, modern party as a result. This has resulted in this Labour government delivering higher living standards, better working conditions and a stronger political voice in the world for the British people. The contrast with the Tory party is stark. Their party is unreformed on Europe - 72% of candidates want a fundamental renegotiation or withdrawal 'as a priority'. There's now a Conservative central office clampdown on their candidates, banning them from publicly declaring their real politics on Europe. Their leadership is afraid of their membership."

Miliband will argue that UK economic recovery would have been impossible without the support of the EU.

Cameron hopes to counter such arguments with the disclosure of Herbert's trip to Poland. Herbert, who became the most senior gay Tory when Alan Duncan was demoted from the shadow cabinet after he spoke out about the expenses scandal, made what Cameron described as a "very powerful speech" to the libertarian Cato Institute in Washington in February.

Herbert argued gay rights are completely compatible with Conservatism as he spoke of how the Tories made themselves irrelevant by failing to embrace social change.