Yes but there are one or two practical problems. If you're using a dc supply then molten potassium metal will be liberated at the negative terminal (cathode) as the positive potassium ions each pick up an electron.
If conducted in air, the molten potassium will rapidly oxidise by catching fire. You'll need an inert atmosphere, such as argon, above the molten electrolyte. Cans of argon gas are available fron Halfords.