Position of the transverse domain wall controlled by magnetic impurities in rectangular magnetic nanowires