If you must treat during the day time, use a knockdown type of spray to knock down and bees flying about. You should be able to dust safely. The bees should be able to pass freely through the nest entrance where they will contact the dust and distribute it inside the tunnels. Also any new matured bees will emerge though the openings and contact the dust placed there. In the fall, the holes should be filled and the entire wood surface painted or varnished.
Pesticides are poisonous.
Read and follow directions and safety precautions on labels. Handle carefully and store in original labeled containers out of the reach of children, pets, and livestock. Dispose of empty containers right away, in a safe manner and place. Do not contaminate forage, streams or ponds. Thanks to Steven B. Jacobs for most of the information contained above.