Intelligent reflecting surfaces (IRS) can improve the physical layer security (PLS) by providing a controllable wireless environment. In this paper, we propose a novel PLS technique with the help of IRS implemented by an intelligent mirror array for the visible light communication (VLC) system. First, for the IRS aided VLC system containing an access point (AP), a legitimate user and an eavesdropper, the IRS channel gain and a lower bound of the achievable secrecy rate are derived. Further, to enhance the IRS channel gain of the legitimate user while restricting the IRS channel gain of the eavesdropper, we formulate an achievable secrecy rate maximization problem for the proposed IRS-aided PLS technique to find the optimal orientations of mirrors. Since the sensitivity of mirrors' orientations on the IRS channel gain makes the optimization problem hard to solve, we transform the original problem into a reflected spot position optimization problem and solve it by a particle swarm optimization (PSO) algorithm. Our simulation results show that secrecy performance can be significantly improved by adding an IRS in a VLC system.