I don't think it can be cured but it can be controlled. THere are certain foods which worsen it eg avoid lots of white bread or white rice, dairy products etc
I was told by a doctor that the pain comes from muscle contraction around the bowel, more fibre in your diet helps a hellava lot, try brown bread and all bran or fibregel sachets.
A member of my family suffers with this. To control it they take a small amount of concentrated Aloe Vera juice, which is available in bottles from health food shops. It helps a lot so they say, prevents any accidents.