The major reason a dog does his business in his crate is because he may have been left in there too many hours. But when it makes a mistake is it only going number one? If it is try and start only giving it water as it leaves the crate in the morning - Set a very strict time @ night and DO NOT give them water after that. Always thoroughly clean the crate if this happens, wipe everything down with vinegar & add a little into the washer while washing the blankets - Vinegar gets rid of the nasty smell, not even your puppy will be able to smell anything. If a dog can smell the scent of there feces they will continue to go in that exact same spot - Vinegar even works great on carpet.
If after that your dog is still is going number one in the crate it might have a bladder infection and you should consult your vet.