In order to be certified organic, you must implement preventative practices and proactive management to control flies and other pests, both in the barn and in the milk house. Approved strategies include: 1) augmentation or introduction of predators or parasites of the pest species; 2) development of habitat for natural enemies of pests; and 3) non-synthetic controls such as lures, traps, and repellents.
Good manure management; pasture rotation; clean, dry bedding; moisture control; and release of fly parasites are all part of successful fly management systems. In addition, many dairy farmers use walk-through fly traps to remove flies from cows when they enter the barn or milking parlor. Many also use sticky strips or tapes, and some use bug zappers and jar traps baited with attractants. If an insecticide is to be used in the barn or milk house, the material must either be derived from natural sources or be on the National List of Allowed and Prohibited Substances. If you have questions about any methods or inputs, be sure to ask your certifier before use.
Also, see the eOrganic article Can I Use this Input on my Organic Farm at http://www.extension.org/article/18321