Two families of optical orthogonal codes (OOCs) are algebraically designed by using the Galois field. The first family of codes has non-ideal auto and crosscorrelation λa = 1, λc = 2 properties. The second family of codes has Ideal auto and cross-correlation λa = 1, λc = 1 properties. It is shown that the p-1 codes exist for every prime p forming a family of (ν, ω, λa, λc) OOCs. These codes may serve as many as p-1 different users in the fiber optic code division multiple access system. We also compare their performance with previous known optical orthogonal codes. We present examples of the constructed codes. The algebraic OOCs being proposed in this paper find applications in asynchronous OCDMA systems.