A police officer is being treated for a serious spinal injury after allegedly being hit by a young man on a trail bike at Doonside in Sydney's west.