Yes, a 20 gauge slug will kill a deer at 50 feet. It will also kill a deer at awhole lot farther than 50 feet.
My youngest son killed his first deer at about 100 yards with a 20 gauge slug from modified barrel.