Optimal design of composite granular protectors