Optimal System of One Dimensional Subalgebras for a Generalized KdV Equations