Gunmen have intercepted and fired at a convoy of vehicles carrying Shi'ite Muslims in Pakistan, killing 38 people, officials say.