Yes, you can and in some cases you should.

Was and were are past forms of the verb be, an irregular verb that is extremely common.

We use was in the first person singular (I) and the third person singular (he, she, it):

I was tired and sat down in my favorite armchair.
She was in the kitchen when there was a knock on the door.
It was the first Tuesday in April.

The other persons take the form were:

Were you happy with the result?
We were together.
They were down by the river.

Was and were are also auxiliary verbs, that is, they are followed by another verb:

I was having a nap when you called.
Was he really doing that?
I thought you were going to help her.

It is possible to use were also with I, he, she and it. We do so in situations that are not real. It can be a hypothetical situation (usually with the word if):

Even if he were my boss, I wouldn’t do it.
If I were you, I would definitely accept the offer.
If this were true, you could stay there for a whole month.

It can be wishful thinking:

I wish I were in Rome again.
How I wish that she were here!

Tourists outside the Colosseum in Rome, Italy
I wish I were in Rome again…

This form of the verb is called the subjunctive mood. The were form with you, we and they is also subjunctive in hypothetical or counterfactual statements, even if it does not differ from the indicative form used in ordinary sentences:

If they were younger, I would offer them a job (subjunctive).
They were already there when I arrived (indicative).

You should avoid writing *I wish that she was here. (For the use of the asterisk, read at the end of this text.)