You can most certainly drill through ceiling joists to run wire however there are a few things you should take into consideration before doing so. First, make sure the drill bit is the appropriate size for the screws or nails you'll be using to secure the wire. Second, use a level when drilling to ensure your holes are evenly spaced and parallel to one another. Third, be mindful of where any pipes or electrical lines are located in order to avoid them while drilling. Finally, always wear safety goggles when working with power tools.