The k-ary n-cube, denoted Qnk, is one of the popular communication patterns of parallel algorithms. This paper addresses the routing and wavelength assignment for Qn3 communication pattern in array-based WDM optical network. By using congestion estimation and giving a routing and wavelength assignment strategy, we prove that the optimal number of wavelengths is 3n-1.