Al Shabaab militants have beheaded two Somali policewomen, prompting a policeman to kill five women linked to the group who were being held for a possible swap of captives, an official said on Wednesday.