Reconstruction of concentration profiles in heterostructures with chemically modified interfaces