Calculation of local and gap mode frequencies from impurities in alkali halide crystals