Answer:
yes, it can be of odd degree
Explanation:
The local maxima and minima correspond to zeros in the derivative of the function. The degree of the polynomial will be 1 more than some multiple of 2 greater than the number of zeros in the derivative.
__
based on derivative
For 2 each of local maxima and minima, the derivative will have 2+2 = 4 real zeros. The degree of the polynomial will be 1 greater, hence of degree 5 (or more). The polynomial must be of odd degree.
__
based on behavior away from extrema
The local extrema must alternate: a maximum must be followed by a minimum, or vice versa. When there are an even number of each kind, the end extrema will be of opposite kinds. The end behavior of the function will be upward from a minimum and downward from a maximum. Hence the end behaviors must be in opposite directions--characteristic of an odd-degree polynomial.
The polynomial must be of odd degree.
_____
Additional comment
A polynomial with real coefficients will have an even number of complex roots. The complex roots of the derivative of a polynomial have no effect on the number or kind of extrema.
__
Attached is an example of a polynomial with 2 maxima and 2 minima. It is of 5th degree.