Magnetic monopoles in string theory