Technically you can, but you really shouldn't. Using the power tool for operations different from those intended could result in a hazardous situation. This drill is for drilling and driving screws. Mixing thick compounds puts a huge, uneven strain on the motor and gearbox that it's not designed for, which can burn out the motor or break internal parts.
If you do it anyway (I've been there), you must use extreme caution. Use a low speed setting if you have one, and don't force it. The bigger risk is material contamination. If drywall mud or paint gets inside the tool through the vents, it can short the electronics, seize the motor, and void any warranty. It's a great way to kill a drill.
Heads up: For mixing, rent or buy a dedicated low-speed mixer. It's cheaper than replacing your drill.