It's totally possible. You would probably want to lower your LDL cholesterol while increasing your HDL cholesterol.
To gain weight, you need to up your caloric intake by eating more of the (preferably low-fat) foods that help improve your cholesterol profile while providing adequate protein and other nutrients. For example,
- (Soluble) Fiber -- good sources have 5 grams or more per serving (eg. oats, whole grains, fruit esp. apples/grapes/citrus, legumes).
- Fruits and vegetables -- antioxidants.
- Unsaturated fats (the good fats) -- Monounsaturated fats (eg. canola/olive oil, avocados, almonds, walnuts, peanut butter) lower LDL without lowering HDL. Polyunsaturated fats (eg. sesame/corn oils, nuts) lower LDL but also lower HDL.
- Avoid/limit trans fatty acids, saturated fats -- eg. fried foods, processed baked goods like cookies/donuts/crackers, stick margarine (read the label on the package and avoid "partially hydrogenated" anything)
- Reduce cholesterol from animal products by occasionally substituting for soy products.
As for exercise, aerobic exercise is really important for decreasing health risks associated with high cholesterol. You should also implement a weight training program to help increase your weight through the addition of muscle mass.