Step 1: Energy considerations.
The total mechanical energy of the pendulum is conserved. The maximum speed occurs when the pendulum is at the lowest point, and the speed at any other point can be found using energy conservation. At the lowest point, the total energy is entirely kinetic, so:
\[
E_{\text{total}} = \frac{1}{2} m v_{\text{max}}^2
\]
At an angle \( \theta \), the energy is split into potential and kinetic parts. The potential energy is given by:
\[
U = mgh = mgL(1 - \cos \theta)
\]
The kinetic energy is:
\[
K = \frac{1}{2} m v^2
\]
Step 2: Applying energy conservation.
By energy conservation, the total energy remains constant, so:
\[
\frac{1}{2} m v_{\text{max}}^2 = \frac{1}{2} m v^2 + mgL(1 - \cos \theta)
\]
Simplifying, we get:
\[
v = \sqrt{v_{\text{max}}^2 - 2gL(1 - \cos \theta)}
\]
Step 3: Substituting known values.
Substituting the known values:
\( v_{\text{max}} = 4 \, \text{m/s} \), \( L = 0.4 \, \text{m} \), \( g = 10 \, \text{m/s}^2 \), and \( \cos 30^\circ = 0.5 \), we get:
\[
v = \sqrt{4^2 - 2 \times 10 \times 0.4 \times (1 - 0.5)} = \sqrt{16 - 4} = \sqrt{12} = 2 \sqrt{3} \, \text{m/s}
\]
Step 4: Conclusion.
The speed of the pendulum at a 30° angle with the horizontal is \( 2 \sqrt{3} \, \text{m/s} \), which corresponds to option (D).