Although it is looking into obesity, they did find that apples restored abnormal microbiota.
I suffer from mild IBS myself, and find that eating an apple a day seems to help (although it's impossible to know for sure without doing a double-blind trial on myself).