A man in his 30s is in custody after a police officer was allegedly struck in a hit-and-run in Perth’s east overnight.