A model relating structure of colloidal gels to their elastic properties