Yes, it is considered safe and effective to mix herbicide and insecticide as long as the product instructions say so and the biological and chemical components of the products are compatible.
Make sure the instructions on the containers of each herbicide and insecticide product allow them to be tank mixed, otherwise you could end up destroying your plants.
Some brands may also sell a pre-mixed container of both herbicide and insecticide to prevent customers from having to research the guidelines on using them both together.