It sounds like the doctor was describing encopresis.
If so, he needs fiber. When he says he doesn't know why this is happening, it's because he really can't predict when this will happen.
I can't imagine parents not being concerned enough about this to follow doctor's orders!
http://www.keepkidshealthy.com/WELCOME/conditions/encopresis.html