Massachusetts Gov. Michael S. Dukakis, like his Democratic presidential rival Rep. Richard A. Gephardt (D-Mo.), deducted from campaign spending limits half of his Iowa television buy late last year as a fund-raising expense.

Leslie Dach, a spokesman for Dukakis, said yesterday that Dukakis' campaign counted $40,845 of an approximately $82,000 television buy as a fund-raising expense, exempt from the $775,000 Iowa spending limit. Gephardt deducted half of a nearly $240,000 television buy in December. Both campaigns already were so close to the Iowa spending limit that their Iowa staffs were not being paid last week, campaign officials said.

Dach said the Dukakis campaign, like Gephardt's, relied on a 1984 Federal Election Commission decision that let Sen. John Glenn (D-Ohio) deduct half of a half-hour television show as a fund-raising expense.

FEC spokesman Frederick S. Eiland has said that the Glenn case was decided on a specific set of facts. If the FEC challenges the 50 percent writeoff, the Dukakis and Gephardt campaigns might have to add the expenditure to their spending levels in Iowa, putting them beyond the legal limit.

Dach said that the Dukakis television commercials ended with a fund-raising appeal, pointing out that the governor does not accept political action committee funds and urging viewers "to contribute" by calling a toll-free telephone number.