Definitely! There is no harm in soldering electrical wires. In fact, it is a common practice to solder wires together when they are being connected to a circuit board or other electronic device.