So, nothing directly specifies that a weapon trap had to be a melee weapon, but most of the applicable text (pg 172-173) seems to heavily imply it.
If you did use a bow, it seems like there would still be a pivot point used to determine who gets hit.