No, you shouldn't use duct tape to wrap wires. A wire nut can be used to cap the exposed end of a wire. If you want to coat a bare wire for any reason, you should replace it with an insulated wire or use heat-shrink tubing. If you must use tape, use an appropriately listed and labeled electrical tape instead.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.