In general, there is no problem in screwing drywall (or most other materials or light weight fixtures) into any framing members. This includes 2X studs, beams, steel studs or other variants on these.
There are restrictions on notching and drilling large holes. Dimensional lumber is most forgiving of these modifications, but manufactured beams have especially strict rules about what size and shape holes can be punched through them, and also restrict where they can be put.
Screws, especially thin drywall screws, present no such compromise. If there is some reason why you don't want to screw into the beam, you could use construction glue, but this is much harder to remove if there is some need to change or repair the area.