The new administration’s freeze on visas for a targeted group of countries could provide an early test of its relationship with Tehran.