Exact solitons, periodic peakons and compactons in an optical soliton model