Method of running Romex across roof joists to recessed cans
More information details would be needed to work out a definitive answer but in general the answer is yes if you keep the hole in the middle 1/3 of the joist depth. The worst thing to do is cut the bottom 1/3 where the joists are in tension and cutting it there will severally reduced the strength and create stress concentrations that will most likely cause cracking over time.