Semi matrix-free twogrid shifted Laplacian preconditioner for the Helmholtz equation with near optimal shifts