Random Access Protocol with Channel Oracle Enabled by a Reconfigurable Intelligent Surface