how underweight are you? are your doctors concerned you have an eating disorder? have you shown them Heather's book? you can gain weight without eating trigger foods. no doctor should be recommending high fat foods for weight gain, nor should a doctor be recommending GI triggers to an IBS patient. you have been officially diagnosed with IBS, right? have you had a colonoscopy and stool test and bloodwork done?
you can go to the health food store and get a soy protein powder that can be mixed it in smoothies and other drinks. those have a nice amount of calories and no dairy. if you drink one of those in the morning and one in the afternoon, you will be adding a lot of calories safely. add soy milk and/or yogurt and fresh or canned fruit. (i make it even more safe by adding in my acacia) you can snack on safe cereals, as well. have a soy yogurt as a little snack. aim for 5 small mini-meals a day with plenty of protein.
gaining weight is simple math, just as losing weight is. you need to eat more foods that are safe to raise the amount of calories you are taking in. can your doctor recommend a dietician? (if so, make sure you take Heather's books to the appointment) it's inexcusible for a doctor to be forcing anyone to eat foods that are making them sick, but i feel like there must be more to the story here...