Elections officials in Afghanistan have disqualified dozens of candidates from the country 's upcoming parliamentary elections because of alleged links to militias .