The short answer is that you can, but you probably wouldn't want to. You could probably cut it down with no noticeable ill affects, but there would be some. For example, you'd have a shorter sight radius, and different swinging properties, which would come in play at clay games and hunting.
THe other thing is that if you cut down the barrel, you might wind up doing something to it that WOULD affect accuracy, such as bending it, etc. Shotgun barrels are made to be easily swappable, so for the price of having someone work on the shotgun and do the job right, you could just get a 20'' or 18'' barrel for your shotgun, and they you'd have two barrels, one for SD, and one for other stuff. IN addition, you would then have a cylinder choked SG, which is fine for close range defense (IMHO) and slugs, but might be a little difficult at longer ranges, IE, duck hunting or trap shooting.
Think about it this way: if you bought a used glock 20 from someone with a 6", kkm barrel, would you cut it down to 5 inches, or buy another barrel for SD, saving the 6 incher for hunting? (Analogy coming from someone who knows almost nothing about pistols.)
EDIT: what model shotgun do you have?