Navy fires warning shots in encounter with Iran