Until we know what the structure is, and its design, we cannot make any fully informed decisions as to whether it is ok to drill the timbers, or not. We may, given years of experience, make a decision with which we are confident.
It is well-known that in most new-build houses, for example, the roof trusses are deigned down to a size that will support the designed roof, but no more. Hence, the NHBC new homes handbook strongly advised against storing stuff in the attic, and certainly said not to floor it, because the trusses wouldn't adequately support the weight.
In the OPs case, if it's clear that a hole in the timber is insignificant, that's one scenario...but we need to know the roof design and purpose before making holes in it.
A major housebuilder was constructing new homes near me a few years ago. They had a bungalow design, and a similar one where there were 2 extra bedrooms and a bathroom in the loft. The difference in price was over £100k. Why not buy the cheaper one, then add the extra rooms later? Because the roof trusses were too small to support the extra load. I asked a structural engineer to quote me for the bigger trusses...the cost of installing the larger trusses was £800...so, still a bit left over for some plasterboard, doors and a bathroom suite.
Decide how big the holes have to be...for lighting circuits, very small...will those holes compromise the integrity of the roof structure? Just make sure you can justify your calculations.