I don't think your equation as written is correct, since ##\ddot{\theta}## can certainly be negative. Better to write something like ##\tau_z = I \ddot{\theta}_z## or simply ##\tau = I \ddot{\theta}##.
Anyway, suppose a body is undergoing rotation about some fixed point ##\mathcal{O}## (this causes no loss in generality, since any infinitesimal motion can be described as the composition of a translation and a rotation, and by extension any motion can be described by the position of some reference point and the rotation around that reference point).
The moment of inertia tensor at the point ##\mathcal{O}##, which we might call ##I_{\mathcal{O}}##, is defined by an integral ##(I_{\mathcal{O}})_{ij} = \int dV \rho(x_k x_k \delta _{ij} - x_i x_j)##, N.B. summation over repeated indices, over the volume ##\Omega## which comprises the body. The ##\{ x_i \}## coordinates are relative to the origin ##\mathcal{O}##. Then$$L_i = (I_{\mathcal{O}})_{ij} \omega_j$$Now if the moment of inertia is constant during the motion,$$\tau_i = (I_{\mathcal{O}})_{ij} \dot{\omega}_j \equiv (I_{\mathcal{O}})_{ij} \alpha_j$$Furthermore, if the angular acceleration is constrained to only one direction, e.g. perhaps ##\boldsymbol{\alpha} = \alpha \boldsymbol{z} = \ddot{\theta}_z \boldsymbol{z}##, then all the terms in the sum on the RHS drop out except for one, in which case$$\tau_i = (I_{\mathcal{O}})_{iz} \alpha_z$$If you chose your coordinate system to coincide with the principal axes, then ##a\neq b \implies I_{ab} = 0## (i.e. the moment of inertia tensor has diagonal matrix representation), and simply you have$$\tau_z = (I_{\mathcal{O}})_{zz} \alpha_z, \quad \quad \tau_x = \tau_y = 0$$In cases like this it is conventional to rewrite something like ##(I_{\mathcal{O}})_{zz} \equiv (I_{\mathcal{O}})_{z}##.