Impurity-induced discharges in plasma electrolysis