Depends on what your using and how its applied.
If your bug bombing your whole house a week before harvest, that's probably not a good idea.
If what your applying is a sotrebought spot or band treatment, as long as your not applying it directly on your plant, it likely wont be a major issue.
Just use common sense... try your hardest NOT to smoke insecticides, and you'll be fine