A New Rochelle, N.Y., firm pleaded guilty yesterday to charge it conspired to evade the ban of exports to Iran during the hostage crisis last year by shipping $300,000 worth of welding machinery through West Germany and the Soviet Union to Iran.

The Justice Department said that Geils and Foerst Marine Electric Inc. pleaded guilty in U.S. District Court in Newark, N.J., to charges that it conspired to evade President Carter's export ban and made false statements to Customs Service officials about where it was sending 250 gasoline-driven welding machines. The machines eventually would up in Iran, where they were used to repair damaged sections of one of Iran's oil pipelines.

The department said Geils and Foerst bought the welding machines from a Minnesota company, then shipped them on Jan. 1, 1980, to a Northvale, N.J. firm, GLT Industries, that was owned by Leonard Freeman, who also owns Geils and Foerst. The agency said that Geils and Foerst arranged to ship the machinery to an Iranian export-import firm in Augsburg, West Germany, because of the refusal of longshoremen's unions to load cargo bound for iran.

The welding machines were still on Jersey City piers when Carter issued his April 7 order banning the shipment of goods to Iran under the International Economic Emergency Powers Act. The Justice Department said that the Customs Service held up the shipment for seven days, asked Geils and Foerst the destination of their welding machines and that the company arranged to have the Iranian firm in Augsburg send it a telegram declaring that the machines were destined for Germany.

In fact, the department said, the machines left Jersey City April 17. It said that when they arrived in West Germany, the Iranian firm receiving them asked a West German freight forwarding firm to tranship them to Iran. The department said that when the German firm refused to handle any shipments to Iran, transhipment from Germany through the Soviet Union to Iran was arranged.

Justice said that payment for the equipment was made to Geils and Foerst through letters of credit and checks drawn on West German banks, further evidence that the company conspired to evade the ban on exports to Iran.

The company pleaded guilty to one criminal count before U.S. District Court Judge Clarkson Fisher, who was asked to level the maximum fine of $80,000 on the charge. Justice also filed a civil complaint against Geils and Foerst, seeking a $10,000 fine on the civil charge.