LONDON (AP) _ Members of Parliament expressed concern Thursday about allegations that Britain's intelligence service had tapped telephones of leaders of labor unions, an anti-nuclear protest group and public figures.

Gerald Kaufman, the opposition Labor Party's spokesman on internal affairs, said a television documentary that has been banned by the government alleged there was a ''dirty tricks department in the Ministry of Defense'' that had infiltrated Britain's major anti-nuclear group, Campaign for Nuclear Disarmament.

The documentary was to have been shown Wednesday night on independent Channel 4's ''20-20 Vision'' program, but the Independent Broadcasting Authority, a government-appointed television watchdog committee, said its broadcast could be illegal under Britain's Official Secrets Act.

A former government counter-espionage agent alleged in the film that the phones of labor leaders and strikers had been bugged to find out what pay offers they would accept.

Home Secretary Leon Brittan refused to confirm or deny the wiretaps, saying it was longstanding policy never to disclose when a phone was bugged.

''If it became the practice to deny allegations where there had been no interception, silence or an equivocal answer in other cases would inevitably be taken to imply that interception had taken place,'' he wrote to a member of Parliament for his Conservative Party in a letter made public by his Office.

Brittan strongly hinted that the Campaign for Nuclear Disarmament was not regarded as subversive and was not under surveillance. But he did not have any assurances for trade unionists.

The director of public prosecutions was starting an investigation of the matter, said a spokesman in the director's office who did not permit use of his name.

Asked whether prosecutors were investigating the television program or the allegations it made, the spokesman would only note that the broadcast authority had expressed concern about a possible violation of the Official Secrets Act.

Britain's tough secrecy law makes it a crime to release information without authorization, and even former members of the country's security services - like those interviewed in the documentary - are obliged to keep silent.

The law does not specify what kinds of information need to be authorized for release.

Despite the ban, the program was shown to about 20 members of Parliament Wednesday night, and by Thursday some 40 lawmakers had signed a petition regretting the ban and calling for the program to be broadcast nationally.

''I think that films like this deserve to be seen,'' said Steven Norris, a Conservative lawmaker. He said he was disturbed by the film's allegation that ''a number of people in public life .. . have had their telephones tapped or possibly have had their mail interfered with.''

The film was largely based on an interview with a former intelligence officer named Cathy Massiter who said her section of MI5, Britain's counter- espionage agency, had done surveillance of Campaign for Nuclear Disarmament, a broad-based protest organization.

Ms. Massiter was described as a staffer for MI5 from 1970 to 1984 when she left the agency. Also interviewed was a former security officer whose identity was not revealed.

Ms. Massiter said that in the 1970s, MI5 also had tapped the phones of labor leaders such as Arthur Scargill, president of the National Union of Mineworkers, and the miners' union vice president, Michael McGahey. MI5 also tapped phones of leaders of striking firemen and Ford Motor Co. unions to learn what pay offers they would accept, the program alleged.

The Conservative government of Prime Minister Margaret Thatcher, while criticizing the aims of peace groups like Campaign for Nucle background of persistent complaints by the anti-nuclear group's members and offices that they believed their phones were tapped and some of their mail was being opened.

Ms. Massiter said the information gleaned from surveillance of Campaign for Nuclear Disarmament was passed to a unit in the Defense Ministry set up by Defense Secretary Michael Heseltine to counter the anti-nuclear group's statements and publications.

A Defense Ministry spokesman, who did not permit use of his name, said that a unit called DS19 had been responsible for preparing speeches and publicity about the government's nuclear weapons policy, and said it had been disbanded in the fall of 1983.

The spokesman would not comment further.

Conservative House leader John Biffen said government policy was not to confirm or deny any allegations of phone-tapping.