The Scottish government has been accused of "waste and incompetence" as the ferry network faces a critical shortage of ships.