As with any destination you visit, if you have a food allergy you're advised to inform your host or tour guide about your dietary requirements.
If your allergy is severe it's wise to carry a printed card with your allergy outlined in English and Samoan.
It pays to carry your own appropriately packaged medication at all times and ensure that you and your travelling party know how to use them. Check that your travel insurance covers allergies, which is normally classed as a pre-existing condition.
Samoa has a number of hospitals and medical centres if you need medical advice or treatment.
If you need to bring food into Samoa, check with the Ministry of Agriculture and Fisheries that these are permitted.