Joint Sum Rate and Blocklength Optimization in RIS-Aided Short Packet URLLC Systems