Is Duck/Duct tape safe to use to insulate mains wires?
Use an appropriately listed and labeled electrical tape instead if you must use tape -- duck tape is an unknown quantity when it comes to insulating properties, and also is more likely to combust if hit with sparks than a proper electrical tape would.

Of course, if you can use heat-shrink tubing or some sort of wire connector (wirenut or push-lock) instead, that's a much better solution -- electrical tape doesn't last the way a proper heat-shrink job does.